mol wrote:In DBF system - one file is a database. And this file is equivalent to table....
Dear mol:
Following are things you might already know.
According to what I tried this afternoon.
1.Once connect to SQL server with database specified. such as
cConStr:="Driver={SQL Server};Server=.\SQLEXPRESS;Trusted_Connection=yes;Uid=sa;Pwd=1234;"
RDDINFO( RDDI_CONNECT, { "ODBC", cConStr },'SQLMIX')
we could select any table from any database as following sample code.
m_sqlste:='select * from DatabaseName..TableName;'
DBUSEAREA( .T.,,m_sqlste, "tempDBF1" )
......
close tempDBF1
The 2 dots between database name and table name are must required.
2.It is allowed to insert record continously one by one as following sample code.
m_sqlste:='INSERT INTO testdb..testdb_tb1 VALUES(24,'+"'"+'R4C2_testdb_tb1'+"',"+;
+"'"+'R5C3_testdb_tb1'+"'"+');'
DBUSEAREA(.T.,,m_sqlste,"tempDBF3")
m_sqlste:='INSERT INTO testdb..testdb_tb1 VALUES(25,'+"'"+'R5C2_testdb_tb1'+"',"+;
+"'"+'R5C3_testdb_tb1'+"'"+');'
DBUSEAREA(.F.,,m_sqlste,"tempDBF3")
CLOSE TEMPDBF3
As you see the 1th parameter of 2nd RDDINFO() is flase.
That is what I did this afternoon all about.
Best Regards
chen min