Firebird SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsDatabasesFirebird SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 3rd, 2012, 08:58 AM
scrabbl scrabbl is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2012
Posts: 2 scrabbl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 24 m 15 sec
Reputation Power: 0
Filling a Dataset ??

Hi,

i have some problems filling a dataset from a firebird sql embedded database...

Code:
public void readUser(string table)
        {
            FbConnection myCon = new FbConnection("ServerType=1;User=SYSDBA;Password=masterkey;Dialect=3;Database="D:\MyDB.fdb");
            myCon.Open();
            string sqlOrder = "SELECT * FROM " + table;
            FbDataAdapter da = new FbDataAdapter(sqlOrder, myCon);
            DataSet myDataSet = newDataSet();
            da.Fill(myDataSet);
            myCon.Close();
        }


After this lines of code the DataSet is still empty. The property "HasRows" is still false...

If i use an FbDataReader it works fine and i can read the whole Database. Wheres my fault ? How do i fill a DatSet ?

Reply With Quote
  #2  
Old June 5th, 2012, 03:25 AM
GeoffMarshall GeoffMarshall is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2012
Posts: 9 GeoffMarshall User rank is Sergeant (500 - 2000 Reputation Level)GeoffMarshall User rank is Sergeant (500 - 2000 Reputation Level)GeoffMarshall User rank is Sergeant (500 - 2000 Reputation Level)GeoffMarshall User rank is Sergeant (500 - 2000 Reputation Level)GeoffMarshall User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 2 h 26 m 59 sec
Reputation Power: 0
I don't recognise this programming language, no doubt other readers will. Superficially it looks like Java or maybe php. The trouble is there is an interfacing .dll between your code and the firebird database manager that converts your code to sql queries as well as other things, and you need to address your question to people who have familiarity with it.

In particular, following an SQL query, for each row Firebird returns a set of parameters corresponding to the fields requested, and it then repeats this operation for each row that the query returns. It is the task of the receiving code to assemble these into a table. (Actually this is standard for all databases). For example Delphi assembles these in a TDataset component, php assembles them into a hidden table which can be accessed by row reference. It looks like your language needs an instruction to load the data into a Table. As you can see each language handles the data differently, hence my advice to address this question to a forum about your language.

Good luck.
Geoff Marshall

Reply With Quote
  #3  
Old June 5th, 2012, 04:29 AM
scrabbl scrabbl is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2012
Posts: 2 scrabbl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 24 m 15 sec
Reputation Power: 0
Hi,

The programming language is C#.

Thanks for your advice, this confirmed my sucpicion. Ill try to find someone who is familiar with this language an the datset.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesFirebird SQL Development > Filling a Dataset ??

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap