Click here to Skip to main content
13,799,065 members
Click here to Skip to main content

Stats

51.2K views
1.1K downloads
41 bookmarked
Posted 29 Mar 2006
Licenced CPOL

Data Application Block for Firebird SQL

, 29 Mar 2006
Data Application Block for Firebird SQL intended to speed the development of applications.
FbDataApplicationBlock
FbDataApplicationBlock.csproj.user
FirebirdSql.Data.FirebirdClient.dll
Properties
bin
EMPLOYEE.FDB
FbDataApplicationBlock.exe
FbDataApplicationBlock.vshost.exe
fbembed.dll
FirebirdSql.Data.FirebirdClient.dll
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

using MyApplication.Data;
using FirebirdSql.Data.FirebirdClient;

namespace FbDataApplicationBlock
{
    public partial class frmSampleWithParameters : Form
    {
        public frmSampleWithParameters()
        {
            InitializeComponent();
        }

        private void frmSampleWithParameters_Load(object sender, EventArgs e)
        {
            dataGridView1.DataSource = GetProjectsForEmployeeID(8);
            //dataGridView1.DataBindings = myDataset;
            dataGridView1.AutoGenerateColumns = true;
            this.dataGridView1.DataMember = "tblProjects";
        }


        private DataSet GetProjectsForEmployeeID(int pEmployeeId)
        {
            string myConnectionString = "User=SYSDBA;Password=masterkey;Database=EMPLOYEE.FDB;ServerType = 1;";
            DBObject myDBObject = new DBObject(myConnectionString);

            FbParameter[] myFbParameters = new FbParameter[] { new FbParameter("@EMP_NO", FbDbType.Integer) };
            myFbParameters[0].Value = pEmployeeId;

            DataSet dsProjects = new DataSet();
            try 
            {
                dsProjects = myDBObject.RunProcedure(
                     "GET_EMP_PROJ", myFbParameters, "tblProjects");
                return dsProjects;
            }
            catch
                {
                //Place error handling code here.
                }
           return dsProjects;        
        }


    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Xela220
Web Developer
United States United States
No Biography provided

You may also be interested in...

Pro
Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web03 | 2.8.181207.3 | Last Updated 29 Mar 2006
Article Copyright 2006 by Xela220
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid