Author | Topic: testing ads | |
---|---|---|
Jorge L. Borlando | testing ads on Sun, 11 Mar 2018 15:06:51 -0300 Hi to all, I am trying to test advantage and I do not achieve concrete results, my idea is to agile the queries in my dbfs using sql language The error that is generated (ads) when trying to execute the "select" statement is as follows /****************** Error 7200: AQE Error: State = HY000; NativeError = 7041; [iAnywhere Solutions] [Advantage SQL] [ASA] Error 7041: File not found. Verify the specified path and file name is correct. Table name: articu *********************************************************************************/ my question is : How should I open the table to be able to use the "select" statement? here the example : nConn := 0 nDbf := 0 nStatement := 0 nCursor := 0 cPath := "\\JORGEL-DELL\Datos\WNormal\DBFS\" cDbf := 'articu' cAlias:= 'articu' @ace32:AdsConnect( cPath, @nConn ) @ace32:AdsOpenTable( nConn, cPath + cDbf, cAlias, ADS_CDX, ADS_OEM, ADS_COMPATIBLE_LOCKING, ADS_IGNORERIGHTS, ADS_DEFAULT, @nDbf ) @ace32:AdsCreateSQLStatement( nConn, @nStatement ) /// until here I get the handles without declared errors @ace32:AdsExecuteSQLDirect( nStatement, "SELECT * FROM articu WHERE marca_= '00101'", @nCursor ) (*) b1 := 0 b2 := Space( 1000 ) b3 := 1000 @ace32:AdsGetLastError( @b1, @b2, @b3 ) @ace32:AdsCloseSQLStatement( nStatement ) @ace32:AdsDisconnect( nConn ) (*) IDEM error if I replace AdsExecuteSQLDirect() with this statements..... @ace32:AdsCreateSQLStatement( i, @nStatement ) @ace32:AdsPrepareSQL( nStatement, "SELECT * FROM articu WHERE marca_= :name" ) @ace32:AdsSetString( nStatement, "name", '00101', 5 ) @ace32:AdsExecuteSQL( nStatement, @nCursor ) Thanks to all and regards |