Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error with CA x ADO x SQL Server
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00945695
Message ID:
00945802
Vues:
21
>Fabio you are right.
>
>Why when I use SQL Pass Through its run OK ?
>
>SQL Pass Through use ODBC.
>
>Result in SQL profile WITH CA/ADO
>
>exec sp_executesql N'INSERT INTO "confeccao".."familia" ("CD_FAMILIA","DS_FAMILIA") VALUES (@P1,@P2)', N'@P1 varchar(4),@P2 varchar(30)', '0001', 'teste
>
>
>Result in SQL profile WITH SPT
>
>INSERT INTO familia (cd_familia,ds_familia) values ('099','testee')
>
This is the BIG problem
( I do not write other words why I would become acid too much ),
when you use a parameter,
you ( and me ) cannot control the true script sended to the backend's server side.

The interface (ADO,ODBC,...) choice exec sp_.... or put the parameter values inline,
but i have't found a bit of information on help,docs,forum,.... for control this choice.

For your problem,
try to add the SELECT SCOPE... in CA.BeforeInsert() event.
PROC BeforeInsert
cInsertCmd = m.cInsertCmd + [ SELECT scope_identity() AS id]
but i cannot help more because i don't uses CAs.

A last word:
Attention, if the SQL2000 INSTEAD TRIGGERS don't support SCOPE_IDENTITY() ( a bug for me ).

Fabio
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform