sql in VB 
Author Message
 sql in VB

Could I ask you a question. How do you get a SQL query to show in VB? Could
I code the SQL in a command button and then show it in a text box or
something? If so, could you give me a basic example please?

Thank you VERY much!

Dave



Tue, 20 Feb 2001 03:00:00 GMT  
 sql in VB
the easiest way To show a sql query in vb is to using ms usejet
with a datasource and a dbgrid

1- put a dbgrid and a datasource in your form

2-  set up the properties of your datasource and dbgrid control

 Data1.Connect = "Access"  ( your db format)
 Data1.DataBaseName = "c:\yourdir\yourfile"
 Dbgrid1.DataSource = "Data1"

( you can set those things using the properties box too)

3 -Then when you want to show your request just type
 Data1.Recordsource = "Your Sql Query"
 Data1.Refresh
 DbGrid1.Refresh

__-----o( Kli )o-----__


http://www.bluesmoke.org/kli

Quote:

>Could I ask you a question. How do you get a SQL query to show in VB? Could
>I code the SQL in a command button and then show it in a text box or
>something? If so, could you give me a basic example please?

>Thank you VERY much!

>Dave



Tue, 20 Feb 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Slow SQL searches (VB/SQL/Access)

2. SQL in VB code

3. SQL in VB

4. Using SQL with VB?

5. Read query SQL through VB call

6. SQL in VB doesn't work - why?

7. Using Access built SQL in VB Net String

8. SQL within vb.net string error

9. sending parameters to SQL from vb.net combo box

10. SQL Desktop + VB standard - hangs

11. SQL and VB Question

12. Automation error (-2147217911) SQL-DMO / VB

 

 
Powered by phpBB® Forum Software