how to execute SQL statements 
Author Message
 how to execute SQL statements

Hi all,

how do i execute SQL statements in VB?

in ASP programming, i make a string of the statement i want (SQL = "Select *
from table where name="me") then let the database connection execute it
(DBConn.execute (SQL) ).

how do i make this in Visual Basic 6.0?

Thanks.



Wed, 05 Feb 2003 15:20:37 GMT  
 how to execute SQL statements
Dim Db as Database
Set Db = OpenDatabase("myMDB")
SQl = "blah ......
Db.Execute SQL
Quote:

>Hi all,

>how do i execute SQL statements in VB?

>in ASP programming, i make a string of the statement i want (SQL = "Select *
>from table where name="me") then let the database connection execute it
>(DBConn.execute (SQL) ).

>how do i make this in visual Basic 6.0?

>Thanks.



Wed, 05 Feb 2003 03:00:00 GMT  
 how to execute SQL statements
OR

Firstly, add the DAO (2.5/3.5) refference.

Dim db as Database
Dim SQLString as String
Dim QueryResult as Recordset

SQLString = "SELECT * FROM <tablename>"
Set QueryResult = db.OpenRecordset(SQLString)

Quote:

>Dim Db as Database
>Set Db = OpenDatabase("myMDB")
>SQl = "blah ......
>Db.Execute SQL


>>Hi all,

>>how do i execute SQL statements in VB?

>>in ASP programming, i make a string of the statement i want (SQL = "Select
*
>>from table where name="me") then let the database connection execute it
>>(DBConn.execute (SQL) ).

>>how do i make this in visual Basic 6.0?

>>Thanks.



Fri, 07 Feb 2003 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. errors different when executing SQL statements via recordset or connection object

2. Problems Executing SQL Statements

3. Help - Executing SQL statements within VB

4. Write One SQL statement execute in Oracle and SQL Server

5. Can't execute a user define function in an SQL statement

6. Executing a v.long SQL script with multiple go statements

7. How to execute a long SQL statement?

8. Executing UPDATE SQL statements in DAO 3.5 and VB5

9. SQL statement error (Problem when more than once execute)

10. How to execute an SQL statement on a datacontrol

11. How to execute 2 SQL statements in the user-defined query

12. Bitwise ANDs ORs in SQL execute statement

 

 
Powered by phpBB® Forum Software