Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 2 of 2 total |
DBISAM with D2006? |
Wed, Sep 13 2006 2:25 AM | Permanent Link |
"Ian Branch" | Hi Guys,
What's the best way to access a DBISAM database/table in D200 Delphi.Net? Delphi.w32 is OK but in .net I'm lost. It shouldn't be this hard... It's just as difficult in VS2005 too. Regards & TIA, Ian -- |
Wed, Sep 13 2006 3:28 AM | Permanent Link |
Chris Holland SEC Solutions Ltd. Team Elevate | Hi Ian,
You can either use the ODBC driver or the http://www.contextsoft.com/ driver (Client/Server only). ElevateDB will have its own ADO driver so you can use that when it is released. Something like this in C# for the ODBC Driver: (Note this is untested) OdbcConnection MyConnection = new OdbcConnection(); OdbcCommand MyCommand = new OdbcCommand("", MyConnection); OdbcDataAdapter MyDA = new OdbcDataAdapter(MyCommand); DataSet MyDS = new DataSet(); try { MyConnection.ConnectionString = "DRIVER={DBISAM 4 ODBC DRIVER};CatalogName="C:\\Data;"; MyConnection.Open(); try { MyCommand.CommandText = "SELECT * FROM MyTableName"; MyDS.Clear(); MyDA.Fill(MyDS, "MyTableName"); DataTable MyTable = MyDS.Tables["MyTableName"]; foreach (DataRow row in MyTable.Rows) { // Process data here .... } } catch (OdbcException) { // Catch errors here } } catch (OdbcException e) { // Catch connection errors here } finally { Disconnect(MyConnection); } Hope this helps If you would like me to post a small example in VS2005 (in C#) just let me know. Chris Holland Ian Branch wrote: > Hi Guys, > > What's the best way to access a DBISAM database/table in D200 > Delphi.Net? Delphi.w32 is OK but in .net I'm lost. It shouldn't be > this hard... It's just as difficult in VS2005 too. > > Regards & TIA, > > Ian > |
This web page was last updated on Saturday, May 4, 2024 at 12:54 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |