0

Hi,

The following code is use ADODB to connect the database. By this way I would like to change the following coding by using "OleDbConnection", how can I change it?

RstBoa = New ADODB.Recordset
BoaSQL = "Select * From QtyVar ORDER BY QtyVarID"
RstBoa = ConnBoa.Execute(BoaSQL)
With RstBoa
If Not .EOF Then
Do While Not .EOF
'Retrieve Quantity Variance
CboVar.Items.Add(RstBoa("QtyVar").Value)
RstBoa.MoveNext()
Loop
End If
.Close()
End With
ConnBoa.Close()
RstBoa = Nothing
ConnBoa = Nothing

2
Contributors
1
Reply
2
Views
10 Years
Discussion Span
Last Post by paulie
0

Hi,

You need to specify OLEDB in your connection string.

Here's Microsoft's native OLE DB provider:

Public Const ORACLE_MS_OLEDB_CONNECT As String = "Provider=msdaora; Data Source="

That's for connecting to Oracle. The best source for connection strings is:

http://www.connectionstrings.com/

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.