Hi, i am using Data Environment to connect VB with my Access Database.

Can i use SQL statement in my script (manualy)..??
Please tell me how to do it

Thanks

RE
-Denpasar-

after creating the connection object establish the connection to the database. Right click on connection and add a command object .Right click on the command object and select sqlstatment in the general tab in properties . add the sql statment that you want.

Hope that solves your problem.

after creating the connection object establish the connection to the database. Right click on connection and add a command object .Right click on the command object and select sqlstatment in the general tab in properties . add the sql statment that you want.

Hope that solves your problem.

Thanks, but thats not what i want
I'm trying to use SQL statement in my scripting, not by creating an object
something like

DIM strSQL as STRING
strSQL = "SELECT NamPeg FROM ...."
.....
.....


So i make the SQL statement in my project not by creating command object

for example:

Adodc1.Recordsource="Select * from Table1";

i've allready try that, but it doesnt work
i make connection using Data environment object, not by script... :(

but thanks anyway, i'll try again, maybe there is something i miss

What bout trying like this.

Connection1.ConnectionString = "......connection string here.........."
sql = ".........sql query here.........."
Connection1.BeginTrans
Connection1.Execute sql
Connection1.CommitTrans
This article has been dead for over six months. Start a new discussion instead.