|
-
July 23rd, 1999, 06:16 AM
#1
How to pass parameters to a query in the DataEnvironment?
Hi,
How do I pass parameters to a query (Command Object) of a DataEnvironment? I am not being able to assign it in the Command Designer...
Specifically I want my query to be something like
SELECT fieldname1 FROM table1
WHERE
field2 = x;
where the value of x should be changeable at runtime.
And how do I build this query using the SQL builder applet?
The database I'm using is Oracle 8.
Thanks for your time.
-
July 23rd, 1999, 07:00 AM
#2
Re: How to pass parameters to a query in the DataEnvironment?
to build up your sql string you should do something like
sqlstring = "Select fieldname1 From table1 WHERE field2 = '" & x & "'"
you have to use the ' signs if field2 is a text file
-
July 23rd, 1999, 07:13 AM
#3
Re: How to pass parameters to a query in the DataEnvironment?
in the command designer write your sQL command like this:
select * from lahadr where name = ?
if necessary modify the attributes of that parameter in the parameters tab of the command dialog.
to pass that param in your vb code
de.Command1 "meier"
MsgBox de.rsCommand1.Fields(0)
de.rsCommand1.Close
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|