Parametrized create table query 
Author Message
 Parametrized create table query

Ok, ok, guys, I understand that this is a VFAQ.
Please, help me anyway.
I have a three parametes in a create-table Query.
The question is: how passing the three parameters to the Query and
then execute the Query through VB?
Please help me...
Bye
        Carlo

        __
       /\ \
  ____/_ \ \____
 /______\ \ \  /\
 \  _____\ \/ / / Dedicated to
  \/ / /  \/ / /  the greatest
  / / /\ _/_/_/\  love of                "Never use an elevator in a
 / / /\ \_______\ my life.                building that has been hit
 \/__\ \ \______/                         by a nuclear bomb."
      \ \  /
       \_\/                                           A. Einstein

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| +++ snail mail          | +++ e-mail              | Mercenary VB/SQL|

| Via Roma, 201/2         | CompuServe 100571,1037  | Internet surfer |
| 16030 Pieve Ligure (Ge) | Phone    +39 10 3460055 | and Windows     |
| Italy                   | Fax      +39 10 8397516 | vagabond        |
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



Tue, 05 Jan 1999 03:00:00 GMT  
 Parametrized create table query

Quote:

>Ok, ok, guys, I understand that this is a VFAQ.
>Please, help me anyway.
>I have a three parametes in a create-table Query.
>The question is: how passing the three parameters to the Query and
>then execute the Query through VB?
>Please help me...
>Bye
>    Carlo

Hello Carlo,

In VB 4.0 use the QueryDefs and Parameter collections.

Dim db As Database
Dim qd As QueryDef

Set db = Workspaces(0).OpenDatabase("YourDB")
Set qd = db.QueryDefs("YourQuery")

qd.Parameters![Param1] = 1
qd.Parameters![Param2] = 2
qd.Parameters![Param3] = 3

    qd.Execute
    qd.Close
    db.Close

         Alan Davis, Southampton, England



Wed, 06 Jan 1999 03:00:00 GMT  
 Parametrized create table query

Quote:

>Ok, ok, guys, I understand that this is a VFAQ.
>Please, help me anyway.
>I have a three parametes in a create-table Query.
>The question is: how passing the three parameters to the Query and
>then execute the Query through VB?

Alan Davis has the idea. I just wanted to add that you can't
parameterize the names of database objects (tables or fields),
only the criteria. If you want to parameterize a table or field
name, you'll have to generate the SQL in code.

Joe

Never underestimate the power of a WAG.

http://www.citilink.com/~jgarrick



Wed, 13 Jan 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Create multiple tables from a single Make-Table Query

2. Permissions on tables created by make-table queries

3. Executing parametrized queries in ADODC component

4. SQLBase, ODBC and Parametrized Queries

5. Parametrized SQL-queries with ODBC interface

6. create table query creates strange fields

7. Crystal and parametrized queries

8. Parametrized Query with Optional TOP Predicate

9. VB crashe when calling parametrized query within dataEnvironment

10. create table query creates strange fields

11. Create Table Query does not Create Desired Datafields

12. calling Parametrized Access 2000 query

 

 
Powered by phpBB® Forum Software