Using Bind Variables in pass-thru query to Oracle DB.

C

chris

Can I use bind variables in a pass-thru query being sent to an Oracle DB?
How an I generate a prompt to the user? For example, how can I generate a
prompt for this?

SELECT * FROM Oracle_Table WHERE TABLEID=:table_ID_bind_variable
 
P

pietlinden

Can I use bind variables in a pass-thru query being sent to an Oracle DB? 
How an I generate a prompt to the user?  For example, how can I generate a
prompt for this?

SELECT * FROM Oracle_Table WHERE TABLEID=:table_ID_bind_variable

build the SQL statement in a function, maybe.

Function oSQLStatement(byval lngtable_ID_bind_variable As Long)
oSQLStatement="SELECT * FROM Oracle_Table WHERE TABLEID=:" &
table_ID_bind_variable
End Function

Or

Function oSQLStatement() As String
Dim lngtable_ID_bind_variable As Long

lngtable_ID_bind_variable=InputBox("Please Enter a value")

oSQLStatement="SELECT * FROM Oracle_Table WHERE TABLEID=:" &
table_ID_bind_variable

End Function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top