Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error 3251...
Message
 
À
27/07/1997 02:33:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
Divers
Thread ID:
00039436
Message ID:
00041943
Vues:
33
>>>Hi Fox gurus :)
>>>Me again, after all these years :)
>>>Question: When I try SET IDENTITY_INSERT ON|OFF, I don't get a trappable error, but the error is still being raised on the ODBC side and the SET is not set. Has anybody have any experience and especially - luck, in dealing with issuing SET statements from VFP?
>>>I tried this thing in both VB and VFP, but to no avail.
>>>
>>>Thanks in advance,
>>>
>>>Robert.
>>I assume you are using SQL Passthrough for this. I ran into problems doing this sometime back. Try sending the SET IDENTITY_INSERT command and your INSERT command via the same SQLEXEC command.
>>
>>HTH
>
>Hey, thanks for a reply...I thought my messages are never gonna get through!!! I am using PassThrough, but in VB :( That's what the client wants their app developed in. They want to massage the data at will after I'm gone in MS Access, and I can't convince them to use anything but VB. I was also given a specific set of guidelines to use while developing: Set DB = OpenDatabase... Set RS = DB.OpenRecordSet... and that's it. Fortunately, I am given a free hand in terms of stored procedures, views and server cursors, so my life is not THAT miserable :) ... Anyway, have you tried to SET anything through a stored procedure? Please let me know, I am anxious to minimize this spaggetti roll (not sure about the first word :)
>
>Thanks in advance,
>
>Robert.
Robert,
The only thing that I have needed to SET is the Identity_Insert property while making some changes to a table. I am not sure about VB but it should be pretty much the same as VFP concerning SQL Passthrough. With VFP you can include more than one SQL statement during a Passthrough.

As far as using a stored procedure for something like this, that I have not done. I would imagine that as long as the user has permission to execute that procedure and that they have permission to carry out the commands in the procedure, you should be able to do this. The procedure would first have to turn ON the Identity_insert, carry out the commands, and then set Identity_insert back off again.
Everything we see or seems
Is but a dream within a dream
- Edgar Allen Poe
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform