PDA

View Full Version : Iis 6 & Sql 2005


Nikon
04-12-2007, 09:17 PM
I've used both - separately. Never in the same environment. The issue I'm having is trying to figure out how IIS connects to SQL Server. I understand you can make calls in ASP to get the data from the database, but how is the database call processed in IIS?

Any website links to pages that explain it, or even an explanation in the thread would be much appreciated. Just trying to learn more about them as I will probably be dealing with them heavily at work here soon.

And as far as remarks as to why I'm using one or any of these products, please reserve them. I have no say at work as to what gets used.

Zate
04-12-2007, 09:22 PM
I think it uses the built in MS SQL ODBC Driver?.. or built in connection mehtods in .NET ?

Vito_Corleone
04-12-2007, 09:23 PM
I asked my boss. He said:

VitoCorleoneR: still there?
VitoCorleoneR: a guy i know is asking this:
VitoCorleoneR: The issue I'm having is trying to figure out how IIS connects to SQL Server. I understand you can make calls in ASP to get the data from the database, but how is the database call processed in IIS?
VitoCorleoneR: any short answer you know that i can give him?
boss: No
VitoCorleoneR: haha
VitoCorleoneR: ok
boss: Also you don't really need to worry about it
boss: If you want things for your own education look at PHP ;-)
VitoCorleoneR: it's not for anythign to do with me, he was just asking if i know
VitoCorleoneR: cause he needs to do it for work or something
boss: Nelson? When?
VitoCorleoneR: no
VitoCorleoneR: some guy on the internets lol
boss: Oh
VitoCorleoneR: nothing to do with you, me, rover, mdg, nelson
VitoCorleoneR: anyone
boss: LOL
boss: You just use the SQL-server functions
boss: the ADO functions
boss: Basically.. If you have to explain it to them..
boss: They won't know what to do with the information anyway?
VitoCorleoneR: lol
VitoCorleoneR: ok
VitoCorleoneR: thanks

Probably doesn't help in the slightest, but I laughed a little.

Zate
04-12-2007, 09:24 PM
this might help --> http://msdn2.microsoft.com/en-us/library/ms998292.aspx

Zate
04-12-2007, 09:25 PM
your boss is a moron.

Vito_Corleone
04-12-2007, 09:26 PM
your boss is a moron.

Howcome? It was funny.

Joe
04-12-2007, 09:37 PM
your boss is a moron.

Please explain the difference between his boss and yours? Please use valid examples... :lol:

POLLO
04-12-2007, 09:39 PM
Please explain the difference between his boss and yours? Please use valid examples... :lol:

:lol:


Sounds like a interview question - GO

Nikon
04-12-2007, 10:56 PM
:lmao: @ this thread. Thank you everyone for their input.

this might help --> http://msdn2.microsoft.com/en-us/library/ms998292.aspx

This is the closest documentation I have seen about authentication between SQL and IIS, still looking for more articles on it. I think I might be chasing something that doesn't really exist or isn't as complicated as my teammates have led me to believe.

From all of my experience, the programming language with use of libraries makes the requests to the database, but they were trying to tell me that IIS runs the ASP script, if a database call is needed IIS would do it (not the program language interpreter/runtime), and then result to results back to the ASP script.

The closest thing I have come to find in IIS itself, I can't find any documentation on. For example, on a Wk3 Ent box with IIS, look at the properties of a virtual server, go to the "ASP.NET" tab and then "Edit Configuration". You should see something off of the General tab named "Local SqlServer" with a connection parameter.

Zate
04-12-2007, 11:29 PM
Please explain the difference between his boss and yours? Please use valid examples... :lol:

you know i changed jobs right ?.. my current boss is great... you dissing Dan ?

Zate
04-12-2007, 11:34 PM
I get what your saying Will, maybe this ? http://www.w3schools.com/ado/ado_connect.asp

or this --> http://www.webcheatsheet.com/asp/database_connection.php

looks like its ADO.

Joe
04-12-2007, 11:58 PM
you know i changed jobs right ?.. my current boss is great... you dissing Dan ?

Your current boss drives a vehicle that gets 8mpg and can't off-road if he wanted to cause it might scratch the paint... :lol:

I know who your current boss is... and I do not miss Dan... :roll:

BTW, didn't Dan get promoted?

Zate
04-12-2007, 11:59 PM
Your current boss drives a vehicle that gets 8mpg and can't off-road if he wanted to cause it might scratch the paint... :lol:

I know who your current boss is... and I do not miss Dan... :roll:

BTW, didn't Dan get promoted?

lol.. not the Dan your thinking of.. Dan B is my boss. Who he answers too is his problem :-P

uyht
04-16-2007, 07:41 PM
its easy as cake man,

First have the IIS server on your sql server and it will make it alot easier for the pages you have to authenticate to.

what are you specifically tryong to do? We do this all day. PM me if you want to give me a ring and we can talk about it.

It is ADO. best way is to create Stored Procs on the sql side and have ado pass variables to the sp, then split it apart and do what you want with it.

Stored procs make dynamic sql/sql code in general alot easier in my mind because it is very easy to seperate the ASP from the sql.


-------------THIS IS SETTING UP YOUR CONNECTION-----This is a function called on click
String cnnString = "Data Source=GENESIS;Initial Catalog=expense;Integrated Security=True";
SqlConnection sqlConnection = new SqlConnection(cnnString);

SqlCommand cmd = new SqlCommand("LSP_Marketing_Insert_Prospect", sqlConnection);

cmd.CommandType = CommandType.StoredProcedure;

----------------------THIS IS SETTING UP THE VARIBALES THE SP RECIEVES----------
cmd.Parameters.Add(new SqlParameter("@prospid", SqlDbType.Int));
cmd.Parameters.Add(new SqlParameter("@rcvddate", SqlDbType.SmallDateTime));
cmd.Parameters.Add(new SqlParameter("@needbydate", SqlDbType.SmallDateTime));
cmd.Parameters.Add(new SqlParameter("@effdate", SqlDbType.SmallDateTime));
cmd.Parameters.Add(new SqlParameter("@prosptypeid", SqlDbType.TinyInt));
cmd.Parameters.Add(new SqlParameter("@prospserv", SqlDbType.VarChar));
cmd.Parameters.Add(new SqlParameter("@prospenterer", SqlDbType.VarChar));
cmd.Parameters.Add(new SqlParameter("@prospprod1", SqlDbType.VarChar));
cmd.Parameters.Add(new SqlParameter("@prosprod2", SqlDbType.VarChar));
cmd.Parameters.Add(new SqlParameter("@pospae", SqlDbType.VarChar));
//cmd.Parameters.Add(new SqlParameter("@prospassignedto", SqlDbType.DateTime));
//cmd.Parameters.Add(new SqlParameter("@", SqlDbType.VarChar));
//cmd.Parameters.Add(new SqlParameter("@", SqlDbType.Bit));


//--THESE ARE ASSIGNING VALUES TO THE SP VARIABLES from asp-------------

cmd.Parameters["@prospid"].Value = prospdrop.SelectedValue;
cmd.Parameters["@rcvddate"].Value = rcvdatetxt.Text;
cmd.Parameters["@needbydate"].Value = needbytxt.Text;
cmd.Parameters["@effdate"].Value = effdatetxt.Text;
cmd.Parameters["@prosptypeid"].Value = prosptypedrop.SelectedValue;
cmd.Parameters["@prospserv"].Value = addservtxt.Text;
cmd.Parameters["@prospenterer"].Value = Session["winusername"].ToString();
cmd.Parameters["@prospprod1"].Value = prod1label.Text;
cmd.Parameters["@prosprod2"].Value = addprod2txt.Text;
cmd.Parameters["@pospae"].Value = addprod3txt.Text;
//cmd.Parameters["@prospassignedto"].Value = ;
//cmd.Parameters["@"].Value = ;
//cmd.Parameters["@"].Value = ;

-------------------
sqlConnection.Open();
cmd.ExecuteNonQuery();
sqlConnection.Close();

Not sure if this is what you are looking for or not. Hope it helps.