Hi
 
Visual Studio is not a programming language it contains
C#,VB.NET,J#...etc,you did not specified what you're using.I use VB.NET
and I give you some examples according with it,but the code is almost
the same as C#.
 


        Dim wDtbl As New DataTable
        Dim wRdr_Ps As FbDataReader = Nothing
        Dim wCmd As FbCommand = Nothing
            Try
                wConn = New 
FbConnection("Server=localhost;User=SYSDBA;Password=masterkey;Database=mydata.FDB")
                wConn.Open()
                wCmd = New FbCommand("select * from yout table", wConn)
                wCmd.CommandType = CommandType.Text
                wRdr_Ps = wCmd.ExecuteReader
                wDtbl.Load(wRdr_Ps)
            Catch eErr As System.Exception
                MessageBox.Show(eErr.Message, "", MessageBoxButtons.OK, 
MessageBoxIcon.Warning)
            Finally
                If Not (wRdr_Ps Is Nothing) AndAlso Not (wRdr_Ps.IsClosed) Then 
wRdr_Ps.Close()
               If Not (wCmd Is Nothing) Then wCmd.Dispose()
                If Not (wConn Is Nothing) Then
                    If wConn.State = ConnectionState.Open Then wConn.Close()
                    wConn.Dispose()
                End If
            End Try
        End If

      myDatagridView.DataSource = wDtbl

You can also read this  
http://www.firebirdsql.org/dotnetfirebird/developers-documenation.html
http://www.firebirdsql.org/dotnetfirebird/documentation/api/1.7/index.html

http://www.vbforums.com/showthread.php?t=469872
Take care of this : "If you're not using SQL Server then it's a simple matter 
of switching
to the corresponding types of the appropriate namespace for your data
source"





----- Original Message ----
From: Steve Boyd <[EMAIL PROTECTED]>
To: Firebird .Net Provider <firebird-net-provider@lists.sourceforge.net>
Sent: Wednesday, August 13, 2008 5:23:57 PM
Subject: [Firebird-net-provider] FB provider and DataGridView and Visual Studio 
2008

I am trying to use tne .Net provider 2.1.0 with Firebird 2.0.3 and
Visual Studio 2008.  I am unable to get the data from a query to display
in a DataGridView component.  I have placed an FbConnection, FbCommand,
FBDataAdapter and DataSet component on the form.  The FbConnection
parameters are correct because I can successfully connect to the
database.  The FbCommand contains 'SELECT * FROM CT_STATE'. The
FbDataAdapter references the FbCommand as it SelectCommand. The
DataGridView references the DataSet as its DataSource.  In code I put
the following:

FbConnection.Open()
FbDataAdapter.FillSchema(DataSet, Mapped)
FBDataAdapter.Fill(DataSet)
DataGridView.DataMember = "Table"

Everything executes without error but nothing appears in the grid.  What
am I doing wrong.






-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider



      
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to