I have been using VB6 up to now and I now want to convert my old project to
.Net
For this purpose I have a new workstation with Win 7 Ultimate 64bit, .Net
Studio 2008 and SQL Server 2000 on a Win Server 2003.
On my VB6 workstation I can connect to the SQL Server and run stored
procedures etc, but now I am cannot seem to get my code to run. Some one
told me that it is a problem with Win 7 64 bit, and another person said it
was my code. This is the code that I was using so far:
Private Sub LogonCmdB_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles LogonCmdB.Click
objConn = New ADODB.Connection
objConn.ConnectionString = "Provider=SQLOLEDB.1;Persist Security
Info=False;User ID=AB;pwd=123;Initial Catalog=DB1;Data Source=TSTSERV"
objConn.Open()
objConn = Nothing
End Sub
Private Sub objConn_ConnectComplete(ByVal pError As ADODB.Error, ByRef
adStatus As ADODB.EventStatusEnum, ByVal pConnection As ADODB.Connection)
'Handles objConn.ConnectComplete
Select Case adStatus
Case ADODB.EventStatusEnum.adStatusOK
MsgBox("Connection successful.")
Case ADODB.EventStatusEnum.adStatusErrorsOccurred
MsgBox("Error occurred : " & pError.Number)
Case Else
MsgBox("Connection status unknown.")
End Select
End Sub
I would be greatful if someone could help me to get started on this.
I'll have to get a newer version first and then start again.
You should be able to connect to SQL 2000.
Are you still having a problem?
Chas Hyman, MCT
"GavinP" <Gav...@discussions.microsoft.com> wrote in message
news:CEB1ADCD-48CA-490C...@microsoft.com...
"Charles Hyman" <ch...@hyman.com> wrote in message
news:4FA5E561-4A26-4F8F...@microsoft.com...