Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Db1.execute problem
Message
De
10/02/1999 08:24:31
 
 
À
10/02/1999 08:13:32
Sammy Derban
Ghana Telecom
Accra, Ghana
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Divers
Thread ID:
00185901
Message ID:
00185905
Vues:
19
>Hi all,
>
>I am trying to select record from a table that meet a certain condition
>using a memory variable.
>
>I get this message : "Too many parameters. Expected 1."
>
>Here a sample of my code.
>
>db1.Execute ("select sales.* into saltemp from sales where sales.sale_no=txtsaleno")
>
>Note: txtsaleno=momory variable
>if in place of txtsaleno I put in the actual value it works fine.
>
>I'll appreciate some help.
>Also how can I actually remove deleted records from a table.
>(like pack in VFP)
>
>
>Thanks in advance.

You are trying to reference a variable from within the SQL Statement... Try This:

db1.Execute ("select sales.* into saltemp from sales where sales.sale_no='" & txtsaleno" & "';")
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform