vidkrish
Jul 29th, 1999, 08:36 PM
I tried to connect to SQL Server 6.5 database
using ADO (sqloledb Provider ) in Visual Basic 6.0. I get a "Microsoft Visual C++ runtime library error Assertion failed."
Please let me know why.
Is it that ADO was developed in COM using Visual C++ or is it that ADO using Sqloledb provider can be used only with SQL Server 7.0.
Any help would be greatly appreciated by me.
Thanking you all,
Vidya.
This is the code I wrote:-
Private Sub Form_Load()
Dim rstEmployees As ADODB.Recordset
Dim strCnn As String
Dim strMessage As String
Dim intRows As Integer
Dim avarRecords As Variant
Dim intRecord As Integer
strCnn = "Provider=sqloledb;" & _
"Data Source=test;Initial Catalog=test;User Id=sa;Password=pwd; "
Set rstEmployees = New ADODB.Recordset
MsgBox (" Open the db successfully:")
rstEmployees.Open "SELECT Name" & _
"FROM test", strCnn, , , adCmdText
End Sub
using ADO (sqloledb Provider ) in Visual Basic 6.0. I get a "Microsoft Visual C++ runtime library error Assertion failed."
Please let me know why.
Is it that ADO was developed in COM using Visual C++ or is it that ADO using Sqloledb provider can be used only with SQL Server 7.0.
Any help would be greatly appreciated by me.
Thanking you all,
Vidya.
This is the code I wrote:-
Private Sub Form_Load()
Dim rstEmployees As ADODB.Recordset
Dim strCnn As String
Dim strMessage As String
Dim intRows As Integer
Dim avarRecords As Variant
Dim intRecord As Integer
strCnn = "Provider=sqloledb;" & _
"Data Source=test;Initial Catalog=test;User Id=sa;Password=pwd; "
Set rstEmployees = New ADODB.Recordset
MsgBox (" Open the db successfully:")
rstEmployees.Open "SELECT Name" & _
"FROM test", strCnn, , , adCmdText
End Sub