Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM ODBC Driver » View Thread |
Messages 1 to 4 of 4 total |
Reading Table inside ODBC driver |
Thu, Mar 30 2006 4:08 PM | Permanent Link |
Thad Smith | When the ODBC driver connects to the data I need to open one of the tables to verify some
information. I attempted to put the information in TODBCConnection.OpenDatabase before changing the state, but recieve an Error. Where should i make this call and how should it be done? ERROR: ODBC -- call failed. [Elevate Software][DBISAM] Access violation at address 10DAE7DC in module awodbc.dll. Read of Address 00000068 (#11047) [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed IM006 0 [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed (#0). |
Fri, Mar 31 2006 3:37 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Thad,
<< When the ODBC driver connects to the data I need to open one of the tables to verify some information. I attempted to put the information in TODBCConnection.OpenDatabase before changing the state, but recieve an Error. Where should i make this call and how should it be done? >> Could you post the code that you're trying to put into the ODBC driver ? I should be able to tell you where you should move it then. -- Tim Young Elevate Software www.elevatesoft.com |
Mon, Apr 3 2006 9:44 AM | Permanent Link |
Thad Smith | I solved the problem by creating my own DB and Session for this lookup instead of hooking into the ones from the ODBC driver.
I added the following to TODBCConnection.OpenDatabase; begin ... begin if (AnsiCompareText(FCurCatalogName,INMEMORY_DATABASE_NAME)=0) then FDataDirectory:=OpenDataDirectory(FCurCatalogName,'',False,False) else FDataDirectory:=OpenDataDirectory('',FCurCatalogName,False,False); //TMS - B CanUseDriver_Local(FDataDirectory.Directory, FACSLicense); //TMS - E end; ... end; procedure CanUseDriver_Local(aDirectory, aLicense: String); var vSiteNumber: String; vTable: TDBISAMTable; vDB: TDBISAMDatabase; begin vDB := TDBISAMDatabase.Create(nil); try vDB.Directory := aDirectory; vDB.DatabaseName := 'DIR'; vDB.Connected := true; vDB.Session.AddPassword(DecryptStr('B43A2274E6D8FA6C1DDF5B8083')); vTable := TDBISAMTable.Create(nil); try vTable.TableName := 'awgename'; vTable.DatabaseName := 'DIR'; vTable.Open; vSiteNumber := vTable.FieldByName('SiteNumber').AsString; finally vTable.Close; vTable.Free; end; finally vDB.Connected := false; vDB.Free; end; if DecryptStr(aLicense) <> vSiteNumber then raise EacstODBCException.Create('Invalid License for this database.'); end; "Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote: Thad, << When the ODBC driver connects to the data I need to open one of the tables to verify some information. I attempted to put the information in TODBCConnection.OpenDatabase before changing the state, but recieve an Error. Where should i make this call and how should it be done? >> Could you post the code that you're trying to put into the ODBC driver ? I should be able to tell you where you should move it then. -- Tim Young Elevate Software www.elevatesoft.com |
Tue, Apr 4 2006 9:55 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Thad,
<< I solved the problem by creating my own DB and Session for this lookup instead of hooking into the ones from the ODBC driver. >> That will work - the TDBISAM* components layer is included with the driver for that very reason. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Thursday, April 18, 2024 at 08:02 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |