Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Am I using the correct methodology? (Long message)
Message
From
19/01/1999 17:36:07
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Am I using the correct methodology? (Long message)
Miscellaneous
Thread ID:
00177817
Message ID:
00177817
Views:
73
Ok, I am using VFP 5.0 (6.0 is sitting on my desk, I haven't had a chance to upgrade yet) and Sybase's SQLAnywhere 5.5

Here is the scenario... I am writing a data entry front end for a commerical software package my company bought. Its a great program with a ton of features, but the data entry routine stinks. So, I have two databases that I am working with. The first database is used to hold data from the data entry program I wrote to match the input forms. The second database contains the tables in the commerical software package.

The first database is simple. It has one table for each page of the data entry form.

The second database contains all the tables from the commerical package and was created via "CREATE SQL VIEW blah CONNECTION MYCONNECTION AS SELECT * FROM blah" I went thru that command for every table in the second database. I also set properties such that it sends sqlupdates and all the fields are updatable.

Then I wrote a program that goes thru each of the tables in the second database and gathers information from the first database into memory variables. Then it does "INSERT INTO blah FROM MEMVAR" and moves on to the next table in the second database.

Ok... Problems with this methodology: 1. Unless all the character fields are changed into type MEMO they are inserted into the second database with trailing spaces. Not horrible, except the commerical package was written with ANSI set on, and it won't see any of my records if there are trailing spaces in the SYSTEM_NAME key field. Also I have worries that the commerical program's search routines won't work correctly if there are trailing spaces in say, LAST_NAME.

2. Date fields are giving me serious fits. About half the time, it tells me that it can't convert date/time values (ODBC error) and the other half the time, VFP just crashes outright (invalid page fault). Arrrgh. I think that it has something to do with .NULL. values, but I am not sure.

Can anyone suggest ways to clean this stuff up? Maybe I need to do some extra reading? Perhaps I am just missing a few commands here or there. Is creating views of all the commerical package tables the way to go? Should I be looking into SQL pass thru commands, or something like that?

I really feel like I need to get a handle on what makes this all tick. Right now, it feels like magic to me. Something does work correctly, so I fiddle around until it does work, but I don't know what I changed, and just HOW it fixed it. So the next time the same problem comes along, I end up thrashing around again.

Sorry, I have the feeling I am starting to whine, but its been a tense couple of weeks. Any advice is appreciated!

Todd
--Todd Sherman
-Wake Up! Smell the Coffee!
Next
Reply
Map
View

Click here to load this message in the networking platform