I need to communicate with some other software, which uses MsSQL.
I use standard DB tables in paradox.
Idea is to use some intermediate tables in SQL. So I would put data in them, other SW will read from them. And vice-versa.
They put some data in temp tables, I read from them (and do something in my app).
1. I use odbcad.exe to create System DNS of type "SQL Server".
2. I add it to "databases" in bdeadmin.exe
3. i create alias in paradox with
addAlias("SQLxy","SQL Server",AliasInfo)
(
AliasInfo is array with "DATABASE NAME","LANGDRIVER","ODBCDSN","USER NAME" and "PASSWORD")
Up to here everything is working. I can see tables in File-Open-Table in paradox.
And now problems:
1. I can open tables, but some show no data (just empty lines), some I cen see but not edit, some I can edit.
I presume problem is in field types.
Which field types from MsSQL can Paradox work with?
char(10) is OK, I think.
nchar(10) not OK (after some quick testing)
nvarcahr(10) not OK?
What to use for numbers and dates? "date", "datetime"?
What for numbers? "float", "real" ?
And for integers? "smallint", "int", "bigint" ?
2. How to manipulate data in those SQL tables?
I have never used that localSQL language in paradox. I have always used QBE and TCursors.
For this project I do not need QBE, just TCursors.
* open TC: if not TC.Open(":SQLalias:test") then errorshow() return endIf
* insert: if not TC.InsertRecord() then errorshow() return endIf
* data: TC:"ID" = "XY" TC."Num" = 123
* store: TC.ĆUnlockRecord() TC.Close()
From some quick testing I think "valid" SQL types are char, varchar, datetime, float, int, bigint. Anything else?
3. I do not need transactions.
4. Can all TCursor functions be used on SQL table?
qLocate doesn't work? How abput SetRange, SwitchIndex, LockRecord , CopyFromArray, CopyToArray,?
5. Can I do scan TC on SQL table? Is there a speed problem?
Thx Jure