Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Passthrough Command
Message
 
 
À
17/02/2002 20:08:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00621388
Message ID:
00621391
Vues:
8
Hi Mike,

Looks like in the first example the line that starts with 'csql = ' is incomplete or incorrect. It references alias 'a' w/o defining it.

>Hi,
>
>I'm having a problem when querying one of my tables(DBF) using SQL PassThrough. The two sets of commands are shown below.
>
>
>nHandle = Sqlconnect("bbfsdsn")
>csql = [Select a.* from Accounting!datacenter] + Alltrim(Str(thisform.dcno))
>nResult = Sqlexec(nHandle, cSQL, 'cur_result')
>Select cur_result
>Browse
>
>
>nHandle = Sqlconnect("bbfsdsn")
>csql = [Select a.* from Accounting!datacenter a where dcno = ] + Alltrim(Str(thisform.dcno))
>nResult = Sqlexec(nHandle, cSQL, 'cur_result')
>Select cur_result
>Browse
>
>The first set of commands works fine. The second one does not query the table with the parameter I specified. I can't tell the difference between the two. The field dcno in the second command has a data type Integer(4). Any Help will be appreciated
>
>Thanks in advance...
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform