Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Default Primary key on append
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Default Primary key on append
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01024100
Message ID:
01024100
Views:
67
Ok guys sorry about this one I'm sure it's been done over before but it's now late, I've searched hard and I cant figure it out.

I had my application on a local database, in that database I have a stored procedure for getting each tables next Primary key, this I put in the default value for the primary key fields of said tables.

so putting say append blank, gives me a nice new record with the primary key set all ready.

now I want to access this database from a remote view, I have another application with a fresh local database, and this database has remote views to database number one.

I now wish to add a record to one of the tables in database 1 from application 2 more specifically the table pointed at by my remote view.

it does not issue the default value, I cannot seem to call the routine through a sqlexec() I've tried putting all the append code into a stored procedure so I just pass a table name but again that fails (is it because I'm not returning records? it's not actually adding a record either way)

Whats the best way of doing this guys? I was thinking about getting a view to the key table and copying the stored procedures accross so I will create it all from the client end and then send the new record with primary key, this seems mad though. it also means I need to make the primary key field modifiable on the remote view end which I didn't really want.

There must be a good way of doing this, a pointer to a website may be enough, oh and just a reminder, I'm using VFP6 so the auto primary key thingies in 7 or 8 or whenever they were added are not there for me, I call for vfp9 but you know what it's like when it comes to upgraqde time.


Ken.
Next
Reply
Map
View

Click here to load this message in the networking platform