It seems that changing fieldnames is a monumental task since you also have to change all references to them in your app's source code too
I'm not saying I will never use auto-incrementing fields, just not right now. I have to convert a very large program (around 100,000 lines) to SQL, so I would like to change as little as possible to get it running. And I don't want to take any unnecessary risks on this either. I didn't write the code and it is very hard to read and understand so the less changes, the better--for now.
In fact we are finding a solution to inform the user /programmer of that situation.
James Bott wrote:Peiter,
The issue I am still concerned about is that when your ID field in the DBF is imported to an auto increment field in the SQL table, then it is going to be renumbered starting at 1 and not skipping any numbers up to the maximum number of records. If your DBF is numbered the same way then you are OK, but if it is not then you are going to have trouble.
The issues that Reinaldo discussed concern me and lead me to believe that auto increment fields should only be used for table "housekeeping" and not for primary keys. They seem best used for recno() type functions.
James
Maybe I will run in to some problems later (with this duplicate ID column name).
pieter wrote:James, Thank you, (I can use that code from Roa probably when I want to make my code better readable)
I have still another problem:
image hosting site no sign up
When FW_AdoImportFromDBF( oCn, cFolder + "\" + dbfPath[x][1], "00" + cFileNoExt(dbfPath[x][1]) ) is used, a sql table will be made, with also a column ID autoincrement. Some of my dbf files has also an Column ID. I think because of that the above error occured.
I thought of two options:
1) change the autoincrement Column ID of the SQL Table
2) Change the Column ID of the dbf files which will be converted.
I think Option 1 is the best. My question is, is there a way to change Column ID into for example SQL_ID? (with FW_AdoImportFromDBF)
Pieter
...the DBF TO SQL Converter works well.
Well, it is my understanding that SQL automatically creates the ID field for any new table (but I'm a not sure).
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Antonio Linares, Ask Jeeves [Bot], Google [Bot] and 52 guests