Author |
Topic |
goblinland
Starting Member
6 Posts |
Posted - 2006-04-06 : 23:30:54
|
con.ConnectionString = "Provider=SQLOLEDB.1;" &_"Address="& serverIP&","& serverPORT &";" & _"Data Source= Z1VA;" & _"Initial Catalog=" & serverDB & ";" &_"User ID=" & serverLOGIN & ";" &_"Network Library = DBNETLIB;" & _"Password = 123;"is this connection string right? cause i can't connect to remote sql server. is it necessary to use port or just leave only the IP address?thx |
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2006-04-06 : 23:55:43
|
no address parameter... not that i know of,it's the data source parameter that should have your address valueno need to specify network library tooHTHquote: Originally posted by goblinland con.ConnectionString = "Provider=SQLOLEDB.1;" &_"Address="& serverIP&","& serverPORT &";" & _"Data Source= Z1VA;" & _"Initial Catalog=" & serverDB & ";" &_"User ID=" & serverLOGIN & ";" &_"Network Library = DBNETLIB;" & _"Password = 123;"is this connection string right? cause i can't connect to remote sql server. is it necessary to use port or just leave only the IP address?thx
--------------------keeping it simple... |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-04-07 : 01:22:40
|
Refer www.ConnectionStrings.comMadhivananFailing to plan is Planning to fail |
 |
|
afrika
Master Smack Fu Yak Hacker
2706 Posts |
Posted - 2006-04-07 : 02:35:16
|
>>is it necessary to use port or just leave only the IP address?dont use the IP use the host name |
 |
|
goblinland
Starting Member
6 Posts |
Posted - 2006-04-10 : 23:36:32
|
There is something weird about this connection string.when i use Query Analyzer, File.udl, command prompt -osql to connect remote sql server,everything works fine. but when i apply the connection string to my script in file.asp, it generate error. not trusted connection. is it a problem with my IIS or something else?thx |
 |
|
Kristen
Test
22859 Posts |
Posted - 2006-04-11 : 01:04:35
|
"when i apply the connection string to my script in file.asp"Put a Debug statement of some sort into the ASP file so you can see the exact value of con.ConnectionString after it has been prepared. Maybe the string concatenation, or the value of some of the member variables, is not what you are expecting.Kristen |
 |
|
goblinland
Starting Member
6 Posts |
Posted - 2006-04-11 : 01:53:47
|
quote: Originally posted by KristenPut a Debug statement of some sort into the ASP file so you can see the exact value of con.ConnectionString after it has been prepared. Maybe the string concatenation, or the value of some of the member variables, is not what you are expecting.Kristen
Debug statement --> can u give me an example. i am newbie TT-TT. thx |
 |
|
Kristen
Test
22859 Posts |
Posted - 2006-04-11 : 02:34:40
|
Print it to screen or web page (probably hard given the circumstances you describe), store it in a file so you can examine it later, or single-step the application in a debugger.Kristen |
 |
|
goblinland
Starting Member
6 Posts |
Posted - 2006-04-11 : 04:11:14
|
yup. and the error is Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'IUSR_DAVID'. Reason: Not associated with a trusted SQL Server connection.i've read a solution, it's say that i have to make a domain group in SQL, how can i do that? |
 |
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2006-04-11 : 04:28:11
|
before you create that domain group...post your connection string (variables already replaced)it seems you're using windows authentication but the user is not yet added in the sql server--------------------keeping it simple... |
 |
|
goblinland
Starting Member
6 Posts |
Posted - 2006-04-11 : 23:55:57
|
quote: Originally posted by jen before you create that domain group...post your connection string (variables already replaced)it seems you're using windows authentication but the user is not yet added in the sql server--------------------keeping it simple...
i used mixed authentication. umm i found an article at http://support.microsoft.com/kb/176380/EN-US/1. Create an user account on the domain controller called WEBUSER.what is domain controller, i can't found it in my computer.2. Add the WEBUSER account to the guests group of both the SQL Server and the IIS computer. could anyone tell me how to do this. step by step3. On the computer that is running IIS, start the Internet Service Manager i also can't find ISM in my computer. do i have to install it again?My OS is XP. thx a lot |
 |
|
Kristen
Test
22859 Posts |
Posted - 2006-04-12 : 01:58:17
|
If you post the connection string your program is actually generating, AFTER the string substitutions etc., [as Jen asked] then I'm sure we can help you correct it. You will need to output it from your application so you can cut and paste it here - hopefully using one of the debugging methods I suggested.Kristen |
 |
|
|