Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Remote View set identity_insert on
Message
De
16/10/2003 13:04:48
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00839334
Message ID:
00839388
Vues:
31
This message has been marked as a message which has helped to the initial question of the thread.
>1. EASIER- i have a generic method that makes a create table statement ( it's actually a rip-off of gendbc.prg with mods for sql server ). to do the alter takes more work. i can do the work, but i don't feel the need when i have a nice way to do it.
>2. COLUMN ORDER- i don't usually want my new columns at the end of the table. alter table can't get the new columns in where i want them. plus, my application depends on the columns being in the proper location because my application dynamically creates all my edit forms based on the table structure.
>
>Make sense?

Partially :)

I can see why you need it this way now, but I'm not sure it makes sense to do it the way you're doing it.

Nonetheless,
Here's the first way I can think of - I haven't tested this, but in theory, I believe it should work.

1. Make sure the view is created using REMOTE CONNECTION connection SHARE
2. Make sure the identity column in the view has Updatable set to .T.
3. To issue the SET IDENTITY_INSERT ON, create an SPT statement handle sharing the connection of an open view as follows
lcTable="your_table"
lnHnd=SQLConnect(CursorGetProp("ConnectHandle", "your_view"))
SQLExec(lnHnd,"set identity_insert " + lcTable + " on")
And be sure to turn it off when you're done.
Insanity: Doing the same thing over and over and expecting different results.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform