944,087 Members | Top Members by Rank

Ad:
Nov 3rd, 2007
0

SQL in DataEnvironment....????

Expand Post »
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-
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
rtm_e is offline Offline
9 posts
since Oct 2007
Nov 4th, 2007
0

Re: SQL in DataEnvironment....????

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.
Featured Poster
Reputation Points: 665
Solved Threads: 427
Posting Genius
debasisdas is offline Offline
6,406 posts
since Feb 2007
Nov 4th, 2007
0

Re: SQL in DataEnvironment....????

Click to Expand / Collapse  Quote originally posted by debasisdas ...
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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
rtm_e is offline Offline
9 posts
since Oct 2007
Nov 5th, 2007
0

Re: SQL in DataEnvironment....????

for example:

Adodc1.Recordsource="Select * from Table1";
Reputation Points: 28
Solved Threads: 71
Posting Pro
ryan_vietnow is offline Offline
578 posts
since Aug 2007
Nov 5th, 2007
0

Re: SQL in DataEnvironment....????

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
rtm_e is offline Offline
9 posts
since Oct 2007
Nov 5th, 2007
0

Re: SQL in DataEnvironment....????

What bout trying like this.
vb Syntax (Toggle Plain Text)
  1. Connection1.ConnectionString = "......connection string here.........."
  2. sql = ".........sql query here.........."
  3. Connection1.BeginTrans
  4. Connection1.Execute sql
  5. Connection1.CommitTrans
Featured Poster
Reputation Points: 665
Solved Threads: 427
Posting Genius
debasisdas is offline Offline
6,406 posts
since Feb 2007
Nov 6th, 2007
0

Re: SQL in DataEnvironment....????

Hi,

I have created you a small example of recprdset coding and attached it. Check if it is what you need. If further assistance is needed please reply.
Attached Files
File Type: zip Example_RS.zip (1.8 KB, 230 views)
Reputation Points: 13
Solved Threads: 29
Junior Poster
kb.net is offline Offline
169 posts
since Aug 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Visual basic 6 picture background problem
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: noob here! combo box





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC