Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 connection

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-04-28 : 07:34:27
ebrahim writes "how can i connect between sql server and vb ?"

KnooKie
Aged Yak Warrior

623 Posts

Posted - 2003-04-28 : 07:49:05
cnn1 is our class module defined connection......the following parameters are taken from a login form. Once someone has logged in the connection is is just referenced by cnn1

'**********************************************************************************************
' ODBC CONNECTION STRING
'**********************************************************************************************
cnn1.ConnectionString = "Data Source=Sql_Tos_dev_uk_2;user ID=" & Me.txtUserName & ";password=" & Me.txtPassword 'TEST SYS CONNECTION
cnn1.Open
'**********************************************************************************************
'**********************************************************************************************

'**********************************************************************************************
' OLEDB CONNECTION STRING
'**********************************************************************************************
'cnn1.ConnectionTimeout = 15
'cnn1.Provider = "SQLOLEDB"
'''TEST SYS
'cnn1.Open "Data Source=Dev_UK_2;Initial Catalog=Sql_Tos;User ID=" & Me.txtUserName & ";password=" & Me.txtPassword
'**********************************************************************************************
'**********************************************************************************************

====
Paul
Go to Top of Page
   

- Advertisement -