Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Move MM tables to SQL Server
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00430993
Message ID:
00431585
Views:
10
I will look on the MS site and thanks for the info and steps. This will help me greatly. Thank again.

>Hi!
>
> There are some articles on MS site.
> For you case (I suppose NEWID() function used to be the auto-increment key field value generator for your VFP tables) you will need to make some manual fixes and changes in the application.
> First of all, change Key fields on the server to be identity fields, so they will become auto-inctement on the SQL Server. This is the best approach for all SQL Server databases, because SQL Server handles conflicts by itself.
> Than you will need to have some way to refresh ID key in the local cursor or view. Simple query to server will return identity field value for the last INSERT command:
> SELECT @@IDENTITY as nID
>This returns cursor with single row and nID field that contains ID value for lats INSERT command in your connection session.
> However, this cause some limitations for example, you will not be able to use views that add records to two tables simultaneously, you will need to split them and update each separately.
>
> Finaly, if you meant 'system table' is a table that stores last ID key values for NEWID() function, you will not need it at all because SQL Server does all this automatically. Look to your database, you will see a lot of system tables already there, they created for each database and are similar for all databases on SQL Server. ;)
>
> Hope this helped.
>
>> Does anyone know what I need to do in order to move my data into SQL backend. I have sucessfully move some of the tables and create remote view and it works fine except when I add new record that i use the NEWID() function. I guess my question is more of what I need to do to move the the system table to SQL as well and what local and remote views I will have to create for each of these tables. Thanks in advance for any comments or help.
>>
>>-Edmand-
The best way to learn is to jump in and find out.
Previous
Reply
Map
View

Click here to load this message in the networking platform