AphexT
asked on
ADO
Is ADO a completly new language? Is there much to it?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
It is basically used to connect a front end (eg VB application) to the backend (eg oracle). It is the means of communication between the client and the server.
it allows communication between the database and the applicatiosn build from microsoft products like vb, vc, or vba
It is not a language.it is a com which uses to connect the database.if u want to get more details u can refer this site
http://www.w3schools.com/ado/ado_intro.asp
http://www.w3schools.com/ado/ado_intro.asp
I am currently writing a test script in Visual Basic that performs a simple
query and then displays the data via the debug.write command. No matter what
I try I can only get the script to retrieve the first column of my query. I
have reviewed the ODBC trace file and can tell that vb is connecting to the
data source and executing the query. The problem seems to be that vb is not
doing a SQLBindCol followed by SQLFetch but is doing SQLGetData instead.
This would work correctly but vb seems to only be asking for SQLGetData for
column 1 each time. I am including my script incase it is something I am
doing wrong. Has anyone ever had this problem before?
Private Sub Command1_Click()
Dim adoConnection As ADODB.Connection
Dim adoRecordset As ADODB.Recordset
Dim connectString As String
Dim avarRecords As Variant
Dim intRecord As Integer
'—Create a new connection --
Set adoConnection = New ADODB.Connection
'—Create a new recordset --
Set adoRecordset = New ADODB.Recordset
adoRecordset.CursorType = adOpenStatic
adoRecordset.CursorLocatio n = adUseClient
'—Build our connection string to use when we open the connection --
connectString = "DSN=sc_report_odbc;UID=fa lcon;PWD=x "
adoConnection.Open connectString
Set adoRecordset = adoConnection.Execute("SEL ECT
number,contact.name,catego ry,subcate gory FROM probsummarym1")
Debug.Print "Probsummary Records"
Do While Not adoRecordset.EOF
Debug.Print vbTab & adoRecordset(0) & vbTab & adoRecordset(1) & vbTab & _
adoRecordset(2) & vbTab & adoRecordset(3)
adoRecordset.MoveNext
Loop
End Sub
query and then displays the data via the debug.write command. No matter what
I try I can only get the script to retrieve the first column of my query. I
have reviewed the ODBC trace file and can tell that vb is connecting to the
data source and executing the query. The problem seems to be that vb is not
doing a SQLBindCol followed by SQLFetch but is doing SQLGetData instead.
This would work correctly but vb seems to only be asking for SQLGetData for
column 1 each time. I am including my script incase it is something I am
doing wrong. Has anyone ever had this problem before?
Private Sub Command1_Click()
Dim adoConnection As ADODB.Connection
Dim adoRecordset As ADODB.Recordset
Dim connectString As String
Dim avarRecords As Variant
Dim intRecord As Integer
'—Create a new connection --
Set adoConnection = New ADODB.Connection
'—Create a new recordset --
Set adoRecordset = New ADODB.Recordset
adoRecordset.CursorType = adOpenStatic
adoRecordset.CursorLocatio
'—Build our connection string to use when we open the connection --
connectString = "DSN=sc_report_odbc;UID=fa
adoConnection.Open connectString
Set adoRecordset = adoConnection.Execute("SEL
number,contact.name,catego
Debug.Print "Probsummary Records"
Do While Not adoRecordset.EOF
Debug.Print vbTab & adoRecordset(0) & vbTab & adoRecordset(1) & vbTab & _
adoRecordset(2) & vbTab & adoRecordset(3)
adoRecordset.MoveNext
Loop
End Sub
myfalcon>> it is considered to be VERY VERY rude to attempt to ask your own question as a 'sort of' response to someone else's. If you have a question about the use of ADO, then post you own question, with your own pointrs, and MANY more experts will be know that it is here, and you will quite quickly get your answer.
AW
AW