How do i pass variables to data environment's sql?

I assume u Created a DataEnvironment, Connection, Command
and Command is a SQL with Parameter

Suppose U have Created the DataEnvironment as DataEnvironment1, Connection as Connection1
and Command as Command1

Then
u can pass value to the SQL variable as

[INDENT]DataEnvironment1.Command1 <Parameter Value>[/INDENT]
        [INDENT]DataEnvironment1.Refresh[/INDENT]

Example
SQL: SELECT * FROM Student WHERE Name = ?

DataEnvironment : DataEnvironment1
Connecton : Connection1
Command : Command1

[INDENT]DataEnvironment1.Command1 "abc" [/INDENT]
        [INDENT]DataEnvironment1.Refresh[/INDENT]

Then Command1 contains records Where the Name = "abc"

Try this

You need to work with command objects .

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.