Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Downsize SQL-Server or Oracle?
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00399889
Message ID:
00401546
Views:
14
>Thanks for the tip. I just played with sqlcolumns() and sqltables() and got good info, unfortunately I don't see a quick way to get the primary key and alternate key and relation information.
>
>Right now my data source is Oracle 7.3 but by the end of the project it'll probably be SQL-Server7, so any Oracle DB digging I do for relation/etc info would have to be re-done when the backend changes.
>
>I'm going to go back to parsing the SQL table creation code. I have enough leverage in my development process to enforce business rules at the VFP middle-tier level (no stored procs on the back end, etc), so if I can get my string-parsing logic together, I can build a database exactly like what is on the back end.
>
>It is weird that VFP SQL code is more like Oracle than SQL-Server. I wonder what the story is there....
>
>
>
>>The VFP function SQLTABLES() fills a cursor with a list of all tables in the SQL database. SQLCOLUMNS() fills a cursor with structural info about a particular table, from which you can create the VFP equivalent table. Note the 3rd argument of SQLCOLUMNS() where you specify "FOX" to get FoxPro datatypes rather than SQL data types.
>>
>>To read in the indexes, relations and other properties of the database, you'll need to query the numerous system tables SQL-Server. Stored procedures, triggers, etc. will probably have to be rewritten from scratch, but hopefully there aren't a lot of them at this stage of the game.

Good luck to you. Let me know how your adventure in parsing comes along!
"Problems cannot be solved at the same level of awareness that created them." - Albert Einstein

Bruce Allen
NTX Data
Previous
Reply
Map
View

Click here to load this message in the networking platform