BitDaddys

BitDaddys
Home

Product Sections
Product Locator
Email Utilities
Database Utilities
Other Products

Reference Sections
Articles
MySQL
Outlook - Import EML
.net Network Security
Flash
Fireworks
PHP
DB/C
Java
Email File Extensions
EML email file extension
MSG email file extension
TNEF email file extension
TXT email file extension
HTML email file extension
Java Script

OISV - Organization of Independant Software Vendors - Charter Member

Recommended Links

Get Firefox



Get Thunderbird  

MySQL

Find good sites at
Find good sites at Gimpsy  

 

Web Master:

Keith Birchfield


[ db/c info ]

[ dbc2csharp main ] [ dbc2csharp class ] [ dbc2csharp methods ]


dbc2csharp DB/C To C#

( a bridge between DB/C and .Net )

Convert your DB/C DX source code file and record descriptions into a ready to compile visual studio c# project that includes a fully functional maintenance program and re-usable class file that allows traditional IO via DB/C FS and also odbc SQL connectivity. Plus a lot more!



What is it?

dbc2csharp takes your db/c dx code that describes your file record, and generates a microsoft visual studio c# project which can be immediately compiled into a windows gui maintenance program. It also provides a RE-USABLE c# class file that will allow you to rapidly create new .net programs that will read and write your data files quickly and easily.

It is also a lot more! It is a platform that allows you to generate SQL scripts, DB/C code, index batch files and more. It will automatically create compiled dx applications and ready to run executable windows programs! Without needing costly compilers!!!

return to top


How do I get a copy?

dbc2csharp is available for FREE as part of the subscription service at http://subscribers.dbcusers.com !!!

return to top


What is required?

  • DB/C FS (for the .net application and code - but optional for the dx code)
  • DB/C DX source code (only needed to describe your file)
  • .Net Framework 1.1 (used to execute the main application, and to compile the generated code)

return to top


Do I have to have VS 2003?

NO!

Microsoft Visual Studio 2003 is a wonderful development environment, but while dbc2csharp does create a ready to use project file ... You don't have to use it to take full advantage of dbc2csharp generated code!

dbc2csharp will use your .Net framework to automatically compile the generated code for you.

This means you can get a fully functional, fully compiled, ready to use windows based maintenance program, without having to purchase the semi expensive Visual Studio!

But, I you do have VS 2003, then dbc2csharp will allow you to take advantage of that fact, and supply you with all that you need for a ready to compile project. It will even load the project for you if you wish!

return to top


I don't have FS, can I still use dbc2csharp?

YES!

In order to create a .Net windows application that reads and writes to your db/c dx files concurrently with your live db/c applications, you will need FS.

But, If you just want to take advantage of all the generated DX code and other files that dbc2csharp creates, you can!

dbc2csharp will create all the code you need to create DX code and supporting files, including a fully functional maintenance program, without FS!

return to top


Tell me more about what is generated.

  • A C# class file that contains methods to:
    • Access your DB/C DX file utilizing traditional I/O and FS
    • Access your DB/C DX file utilizing SQL and ODBC
  • A C# project that compiles into a windows form program that:
    • Allows you to read, display, print, change, delete and create records via traditional IO
    • Allows you to generate a datagrid report from SQL and then export that report to CSV
  • A compiled and ready to use version of the windows maintenance program for your file
  • A SQL script that will allow you to re-create your file and it's indexes
  • A Batch file that will allow you to do traditional indexing of your dx files
  • A DB/C include file that includes a complete record description and all the routines you need to do traditional DB/C based I/O
  • A DB/C source file that uses the DX IO include file and compiles as a console (.dbc) maintenance program
  • A FS DBD XML file that describes your file
  • A csv file that describes your file's fields / table columns
  • A csv file that describes your isams and their key parameters
  • A batch file that will compile your .net application
  • A compiled dbc console maintenance program

return to top


Can I see an example of everything that is created?

Yes.

For a limited time, if you are a registered dbcusers.com user, we will provide you with a sample package of what dbc2csharp generates for free!

That means you get, for free:

  • A windows maintenance program for your file (compiled and with source code)
  • A DB/C console maintenance program for your file (compiled and with source code)
  • A DB/C I/O include file for your file
  • A C# class file for your file
  • A profile that you can use later for other files
  • A SQL script to re-create your file
  • A Batch file to re-index your file
  • A FS DBD XML file

All zipped and email back to you!

To take advantage you will need to provide

  1. A db/c source file that includes a file record description (i.e. LIST / RECORD / VARLIST etc)
  2. A separate file that includes the index description (Ideally a batch file that contains INDEX commands)
  3. A Name to give to your:
    1. Database/Group (examples: sales, acme, purchasing etc ...)
    2. Table/File (examples: ORDER,PODT,CUSTOMERS etc ...)
  4. (*optional) your fs server name/address , user name, password

Send the above to: sales@bitdaddys.com or kbirchfield@dbcusers.com . Be sure to send it from your dbcusers registered email address!

*if you do not supply this information, the application and code will reference: localhost,defaultuser,password

return to top


 

Screen Shots of dbc2csharp

(click above to enlarge)

(click above to enlarge)

(click above to enlarge)

(click above to enlarge)

(click above to enlarge)

(click above to enlarge)

(click above to enlarge)

(click above to enlarge)

return to top


Screen Shots of Generated Maintenance Program

(click above to enlarge)

(click above to enlarge)

(click above to enlarge)

(click above to enlarge)

(click above to enlarge)

return to top


DB/X DX Maintenance Program Screen Shot

DB/C Maintenance Program

(click above to enlarge)

return to top


What would my c# .net code look like, that uses the generated class file?

Example of FS based Traditional I/O - Read Next Record
 if (dpexmp.ReadKey1Next()<0)
{ // Read Failed
}
else
{ // Read Succesful
}

 

Example of FS based Traditional I/O - Button Pressed - Read Based On Key
private void btnReadFirst_Click(object sender, System.EventArgs e)
{
ClearRecordDisplay();
if (dpexmp.ReadKey1(txtKey1.Text)<0)
{
MessageBox.Show("Key Not Found");
return;
}
DisplayRecordColumns();
}

 

Example of FS based ODBC - Button Pressed - Execute Query and show in Datagrid
private void btnSQLgo_Click(object sender, System.EventArgs e)
{
dpexmp.OpenDB();
dpexmp.Query=textBoxSQL.Text;
OdbcDataAdapter ad1;
ad1 = new OdbcDataAdapter();
ad1.SelectCommand = new OdbcCommand(dpexmp.Query, dpexmp.Connection);
ds = new DataSet();
try
{
ad1.Fill(ds,0,1000,"results1");
dataGrid1.DataSource = ds.Tables["results1"];
DataView myView = new DataView(ds.Tables["results1"]);
}
catch (Exception Ex)
{
MessageBox.Show("Query Failed: "+Ex,"SQL Error");
}
}

 

Example of FS based Traditional I/O - Button Pressed - Read File and show in Datagrid
private void button1_Click(object sender, System.EventArgs e)
{
COMPANYDB.DPEXMP x = new COMPANYDB.DPEXMP();
   DataSet ds = new DataSet(); 
   DataTable dt = new DataTable();
   for (int i=0;i<x.columns.Length;i++)
       dt.Columns.Add(x.columns[i]._Label);
   x.OpenKey1();
   while (x.ReadKey1Next()>-1)
   {
     DataRow dr = dt.NewRow();
     for (int i=0;i<x.columns.Length;i++)
         dr[i] = x.columns[i]._Value;
     dt.Rows.Add(dr);
   }
   x.CloseKey1();
   ds.Tables.Add(dt);
   dataGrid2.DataSource=ds.Tables[0];
} 

 

Example (2) of FS based Traditional I/O - Button Pressed - Read File and show in Datagrid
private void button1_Click(object sender, System.EventArgs e)
{
COMPANYDB.DPEXMP x = new COMPANYDB.DPEXMP(); x.Key1ResultsToDataGrid(dataGrid2); }

 

 

return to top


Can I run in Batch Mode / What are the Command Line Options ?

YES you can run dbc2csharp from the command line / in a batch file

Option Description
-tablelist="tablelistfilename"
Allows you to specify a file that contains a list of table names to use for automatic parsing.
-nolaunch Do not launch the compiled application after it is generated
-launchobject Do launch the compiled application after it is generated
-autocompile Automatically compile the generated code into executables and dbc runtimes
-autorun Run automatically / without the GUI / windows interface
-novs Do not open resulting project in Visual Studio after generation.
-autofill Automatically parse the file / table information based on the supplied table name
-table="mytablename" Use this table name

 

return to top


Contact kbirchfield@dbcusers.com for more info ...

OISV - Organization of Independant Software Vendors - Charter Member
Highlighted Products
EMLDETACH

EMAIL PACK email conversion and action pack
BitDaddys Corp.
$39.95

More Info
Buy Now!

Get all of our powerful email utilities for one very low price more ...

O2X
ODBC 2 C#
BitDaddys Corp.
$5.00

More Info
Free Trial
Buy Now!
Convert ODBC table information into a c# class and a ready to use Visual Studio 2003 project more ...

MSGDETACH
mboxPack
BitDaddys Corp.
$10.00

More Info
Free Trial
Buy Now!
Pack email files into mbox files. Plain text, individual eml,msg,txt files to Thunderstor compatable and ready to use mbox more ...

ThunderStor
ThunderStor
BitDaddys Corp.
$10

More Info
Free Trial
Buy Now!
ThunderStor offers the user a simple, fast and effective method to extract ThunderBird Mail from the mail box files to individual standard email message files.

EML and MSG converter
BitDaddys Corp.
$14.00

More Info
Free Trial
Buy Now!
Convert eml and msg Files into EML, MSG,TXT, TNEF, HTML more ...

emlBridge
BitDaddys Corp.
$12.00

More Info
Free Trial
Buy Now!
Import eml Files into nearly any Email Client. With emlBridge you can import rfc822 standard text email files into programs like Outlook, Thunderbird and Outlook Express more ...

outlookFiller
BitDaddys Corp.
$14.00

More Info
Free Trial
Buy Now!
Import eml and msg Files into Outlook more ...

MSGDETACH
MySQL Data Backup Tool
BitDaddys Corp.
$12

More Info
Free Trial
Buy Now!
Automatic Daily MySQL Database backups. Powerful Backup Rotations. more ...

CSV2DG
CSV2DG
BitDaddys Corp.
$10.00

More Info
Free Trial
Buy Now!
Create, Edit, Import and Display CSV ( Comma Separated Values) files in an easy to use Data Grid with the ability to print, launch Excel or even launch a custom application. This application allows for quick edit and display of csv data in a format that allows for easy viewing, sorting and printing. You can also customize the apparent program name, company name, report title and visible options more...


Google

About Us | Site Map | Privacy | Contact Us | ©2008 BitDaddys Corp.