0

Hi, i am using VB6 with Access databse after a long time and have forgotten some syntax.
I am using ADODC connection (the dirty method) wherein one makes a connection using ADODC component and setting its properties (ODBC and selecting table/ query).
I need to display the fields of a recordset in the form where the field value is given in the text1.text.
I remember vaugely that we used expressions like
Dim str as String
str =" SELECT * FROM paybook WHERE paybook.Field(0) = '"&text1.text&"'"
thereafter how to use this i am ot remembering
Need your help on this please
regards

2
Contributors
3
Replies
4
Views
9 Years
Discussion Span
Last Post by selvaganapathy
0

Use

Connection.Execute SQLQueryString

to Execute the Query.

Dim str as String
str =" SELECT * FROM paybook WHERE paybook.Field(0) = '"&text1.text&"'"
Connection1.Execute str
0

Use

Connection.Execute SQLQueryString

to Execute the Query.

Dim str as String
str =" SELECT * FROM paybook WHERE paybook.Field(0) = '"&text1.text&"'"
Connection1.Execute str

Thanks. But my misery is not yet over. How do i link these selected records to sat a datagrid or display in a text box.
regards

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.