Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Modifying Data Using same code for Both SQL & DBF
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00693294
Message ID:
00698298
Vues:
12
Hi!

In general, only very basic things match between SQL Server and VFP.

There are certain differences in syntax, field type names, field name conventions, field length limitations etc. That causes it is impossible to do by another way than defining these differences for your code, or write code such way that it is independent from these differences.

For example, for SELECT-SQL statements, we had a table where we store a name of query, and 2 versions of query - one for SQL Server and another - for VFP.

Statements for altering structure are almost the same, but you have to be aware about differences in names of field types. For example, "memo" in VFP is "text" in SQL Server.

Defining indexes, relations, triggers and many other things are quite dfferent between VFP and SQL Server.

A couple of other issues are also important when working with SQL Server. For example, in VFP database you can lock record, when it is very hard to organize in SQL Server. SQL Server have built-in approach for generating primary keys, VFP6 and VFP7 does not have it (though could be organized programmatically). This requires also accurate thinking to make it similar fr both VFP and SQL Server databases.

Also, look here and at other VFP-related WEB sites to the topics dedicated to moving VFP applications from VFP database to SQL Server database and vise versa - you will find a lot of useful and interesting information that can help you in this your question.


>Hello,
>We are trying to write an application that can modify data structures/tables, data using the same code regardless if the backend if SQL or VFP 7. Our company does not want to have 2 code bases for performing the same functions when trying to modify data.
>
>I personally have never heard of this, but its not to say its not possible. Has anyone out there found an application, or Overlay that you can send it a SQL command, and it will pass it to SQL or DBF so one line of code can be used to perform the same updates.
>
>Also has anyone found an easy way to Backup (and restore if an upgrade fails) on SQL server from within Foxpro.
>
>Thanks,
>David Roesch
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform