AdoDB Connection String for Valentina v3?
Barry G. Sumpter
BarrySum at BigPond.Net.AU
Mon May 21 18:58:33 CDT 2007
Sorry, got to get my signature sorted out for this mail list.
REALbasic 2007 r2 with Valentina v3 VDK on Windows XP.
Anyone?
---
This sample is for using ADODB connection with MSAccess.
Does anyone know what the Driver info is for Valentina v3?
<http://www.monkeybreadsoftware.de/listarchive-realbasic-nug/2005-11/thread-
01_228.shtml#165687>
...
AdoDB Support. A data abstraction layer used by database solution providers
to interface with a broad range of enterprise class database servers and
technologies.
...
C:\Program Files\REAL Software\REALbasic 2007r2\Examples\Windows OS
specific\Win32 ADO Example\adoexample.rbp
Dim adodbConnection as new OLEObject( "ADODB.Connection" )
Dim adodbCommand as new OLEObject( "ADODB.Command" )
Dim adodbRecordSet as OLEObject
Dim adodbFields as OLEObject
Dim adodbField as OLEObject
Dim connectionString as string
Dim iter as integer
Dim fieldCount as integer
connectionString = "DRIVER={Microsoft Access Driver (*.mdb)};"
connectionString = connectionString + "DBQ=ADODEMO.MDB;"
connectionString = connectionString + "UID=admin;PWD=;"
adodbConnection.Open( connectionString )
adodbCommand.ActiveConnection = adodbConnection
adodbCommand.CommandText = "select * from authors"
adodbRecordSet = adodbCommand.Execute
adodbFields = adodbRecordSet.Fields
fieldCount = adodbFields.Count
listbox1.ColumnCount = fieldCount
while not adodbRecordSet.EOF
adodbFields = adodbRecordSet.Fields
listBox1.addrow ""
for iter = 0 to fieldCount-1
adodbField = adodbFields.Item( iter )
listBox1.cell(listBox1.listcount-1, iter) = adodbField.Value("Value")
next
adodbRecordSet.MoveNext
wend
exception err as OLEException
msgbox err.message
More information about the Valentina
mailing list