Newbie problems with SQL and VB 
Author Message
 Newbie problems with SQL and VB
I got a "little" problem with Access.

I'm making a Guide that makes a lot of new forms and other things. But
I've run into a problem with making permanent queries (it should not be
queries that exist only in VB, you shall be able to click on them under
the query-tab), is there anybody that can help me PLEASE.

And is there anybody who knows if you can see what code a query
contains from within VB.

Sorry for my poor English.

THANKS

Sent via Deja.com http://www.***.com/
Share what you know. Learn what you don't.



Mon, 17 Dec 2001 03:00:00 GMT
 Newbie problems with SQL and VB

If you use the object.CreateQueryDef method and specify a value for the name
parameter, the query will be created in the database and available in the
Queries tab in Access.

To see the code a query contains, you can use the querydef's .SQL property.
It returns the actual sql text that will be run.

Your questions are very clear; no apologies necessary.

HTH

    - Rebecca.


Quote:
> I got a "little" problem with Access.

> I'm making a Guide that makes a lot of new forms and other things. But
> I've run into a problem with making permanent queries (it should not be
> queries that exist only in VB, you shall be able to click on them under
> the query-tab), is there anybody that can help me PLEASE.

> And is there anybody who knows if you can see what code a query
> contains from within VB.

> Sorry for my poor English.

> THANKS

> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.



Mon, 17 Dec 2001 03:00:00 GMT
 Newbie problems with SQL and VB
If just CreateQueryDef does not work, you might have to actually add
the resulting quesrydef to the main collection.

currentdb.querydefs.add currentdb.querydefs.CreateQueryDef(...)

I  have seen that the other way might not create it permanently.

Q.

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.



Mon, 17 Dec 2001 03:00:00 GMT
 Newbie problems with SQL and VB
Really?  I've never had that problem....live and learn <g>

    - Rebecca.

Quote:

> If just CreateQueryDef does not work, you might have to actually add
> the resulting quesrydef to the main collection.

> currentdb.querydefs.add currentdb.querydefs.CreateQueryDef(...)

> I  have seen that the other way might not create it permanently.

> Q.

> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.



Tue, 18 Dec 2001 03:00:00 GMT
 
 [ 4 post ] 

 Relevant Pages 

1. SQL, VB, Access, Queries, Join Problem, and Newbie Problem

2. Newbie: Problem with Access 2.0/VB 4.0 recordset.

3. SQL problem, MSDTC Problem or VB.NET problem?

4. Newbie to VB, converting Access queries in VB

5. vb/access ?'s, newbie to vb from c++

6. Newbie - How do I reference a vb variable in sql

7. Newbie Question on accessing TEXT SQL Server Fields from VB

8. Newbie SQL Server 7.0, VB 6.0 & ADO

9. NEWBIE Question: VB/SQL 7 simple database - school assignment

10. NEWBIE:VB & SQL Server 6.5 Bound Controls

11. Crystal Report/VB/SQL Newbie Question


 
Powered by phpBB® Forum Software