Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Connect to ms. sql server
Message
From
20/05/2003 10:19:54
 
 
To
20/05/2003 04:32:28
General information
Forum:
Visual Basic
Category:
Other
Miscellaneous
Thread ID:
00790320
Message ID:
00790449
Views:
11
When you say sometimes, does it mean there are times when it works? I would try increasing the connection timeout. It's currently set to 15 seconds, that may be your problem. Also, try using the TCP/IP address of the server if the server has a static TCP/IP address.

Roman

>sometimes itis difficult for me to connect to the SQL Server database.. I don't understand why I got below error message:
>
>Server does not exist or access denied ..
>
>I have checked the server and it's running well also the previledge .. its works fine .. am I missing something? below is my connectionstring: (please correct if there is any mistake)
>
>I have tried 3 (three) kinds of connectionstring .. but the same problem still occurs ..
>
>Dim mDataBaseName As String
>Dim mError As Boolean
>Dim mConnectionString As String
>Dim mABCData As String
>Dim mDataDir As String
>Dim mRunPacker As String
>Dim RetVal
>Dim mServerName As String
>Dim mSQLUser As String
>Dim mSQLUserPassword As String
>
>
>mServerName = "LGI2000"
>mSQLUser = "test1"
>mSQLUserPassword = ""
>
>mDataBaseName = "ABCWeb"
>
>' Trial I
>
>'mConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=" & mDataBaseName & ";Data Source=" & mServerName
>
>' Trial II
>
>'mConnectionString = "driver={SQL Server};server=" & mServerName & "; uid=" & mSQLUser & ";pwd=" & mSQLUserPassword & ";database=" & mDataBaseName
>
>' Trial III
>
>mConnectionString = "Provider=sqloledb;Data Source=" & mServerName & ";Initial Catalog=" & mDataBaseName & ";User Id=" & mSQLUser & ";Password=" & mSQLUserPassword
>
>
>cnData.CursorLocation = adUseClient
>cnData.ConnectionString = mConnectionString
>cnData.ConnectionTimeout = 15
>cnData.Open
>
>any idea and or suggestion would be greatly appreciated and many thanks in advance
>
>Regards
>Winan
Roman Rehak, MCSD, MCDBA, MCSA
Competitive Computing
354 Mountain View Drive
Colchester, VT 05446-5824
802-764-1729
Previous
Reply
Map
View

Click here to load this message in the networking platform