I want to connect Sql server 2005 to VB 6.0 for my programming. Can it possible because my client have used sql server 2005. Please suggest as soon as possible.Thank you.
I want to connect Sql server 2005 to VB 6.0 for my programming. Can it possible because my client have used sql server 2005. Please suggest as soon as possible.Thank you.
Yes, You can connect SQL server 2005 to VB 6.0. In SQL server 2005 ,the OLEDB provider is "SQLNCLI" which is SQL native client. So Please change provider name from SQLOLEDB to SQLNCLI and connect through same procedure as last version you had installed.
You also choose this way to conect VB 6.0 to SQL server 2005 from this code :
ConnectionString = "Data Source=" & m_Server & "; " & _"Initial Catalog =" & m_Database & "; User Id = " & m_DbUser & " ; Password = " & m_DbPassw & "; Pooling=False"
As i am testing on my system it will runs so please try on page load event.
Form_Load Event()
dim conString as string=nothing
conString = "Provider="sqldb" ; user id=; password=; database=;"
dim connect as new ADODB.Connection(conString)
connect.open()
'Put a message box to ")
connect.close()
end Form_Load Event
Bookmarks