473,386 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Writing two times instead of one in an database

I have a project in C# that do the followings:

From an csv text file it is taking datas and inserted into an paradox
database. My problem it is that when writing into the paradox database it is
writing two times same datas instead of course one time.

Could be a hel please?
Nov 16 '05 #1
3 1483
hi,
i can help you out provided you have to show me the code.
Nov 16 '05 #2
Hi,
Please find the code bellow:
Thank you

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.Odbc;
using System.IO;

namespace purchaseorder2
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Data.Odbc.OdbcConnection odbcConnection1;
private System.Data.Odbc.OdbcDataAdapter odbcDataAdapter1;
private purchaseorder2.DataSet1 dataSet11;
private System.Data.Odbc.OdbcCommand odbcSelectCommand1;
private System.Windows.Forms.Label label1;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
//mai jos sunt variabilele in care avem informatiile din fisier
String nrpo1;
String cui1;
String numef1;
String data1;
String nrfac1;
String lc1;
String ic1;
String desc1;
String compid1;
String numecomp1;
String nrgest1;
String lc1;
String ic1;
String qtty1;
String pretu1;
String pdisc1;
String vtf1;
String nrfac1;
String codt1;
String numed1;
String cnr;

public Form1()
{
//
// Required for Windows Form Designer support
//

InitializeComponent();
StreamReader sr=new StreamReader("C:\\poclarisys\\po-dupamodificare.txt");
int end;
String result="";
char[] vc={','};
while((result=sr.ReadLine())!=null)
{
string[] vs;
//result=sr.ReadLine();
vs=result.Split(vc);
//scoatem din fisier nr ordinului de cumparare
String nrpo=vs[0];
try
{
end=nrpo.LastIndexOf('"');
nrpo1=nrpo.Substring(1,end-1);
//Console.WriteLine("Numarul ordinului de cumparare: {0}\n",nrpo1);
}
catch(System.Exception){}

//scoatem din fisier codul unic de identificare al furnizorului

try
{
String cui=vs[1];
end=cui.LastIndexOf('"');
String cui1=cui.Substring(1,end-1);
//Console.WriteLine("Nr unic de identif furnizor: {0}\n",cui1);
}
catch(System.Exception){};

//scoatem numele furnizorului
try
{
String numef=vs[2];
end=numef.LastIndexOf('"');
String numef1=numef.Substring(1,end-1);
//Console.WriteLine("Nume furnizor: {0}\n",numef1);
}
catch(System.Exception){};

//scoatem data tranzactiei

try
{
String data=vs[3];
end=data.LastIndexOf('"');
String data1=data.Substring(1,end-1);
//Console.WriteLine("Data tranzactiei: {0}\n",data1);
}
catch(System.Exception){};

//scoatem identificatorul companiei

try
{
String compid=vs[6];
end=compid.LastIndexOf('"');
String compid1=compid.Substring(1,end-1);
//Console.WriteLine("Nr de identif al companiei: {0}\n",compid1);
}
catch(System.Exception){};

//scoatem numele companiei
try
{
string numecomp=vs[7];
end=numecomp.LastIndexOf('"');
String numecomp1=numecomp.Substring(1,end-1);
//Console.WriteLine("Numele companiei: {0}\n",numecomp1);
}
catch(System.Exception){};

//scoatem numarul gestiunii

try
{
String nrgest=vs[8];
end=nrgest.LastIndexOf('"');
String nrgest1=nrgest.Substring(1,end-1);
//Console.WriteLine("Numarul gestuinii: {0}\n",nrgest1);
}
catch(System.Exception){};

//scoatem line code
try
{
String lc=vs[9];
end=lc.LastIndexOf('"');
String lc1=lc.Substring(1,end-1);
//Console.WriteLine("Codul grupei de produse: {0}\n",lc1);
}
catch(System.Exception){};

//scoatem item code

try
{
String ic=vs[10];
end=ic.LastIndexOf('"');
String ic1=ic.Substring(1,end-1);
//Console.WriteLine("Item code: {0}\n",ic1);
}
catch(System.Exception){};

//scoatem descrierea produsului

try
{
String desc=vs[11];
end=desc.LastIndexOf('"');
String desc1=desc.Substring(1,end-1);
//Console.WriteLine("Descrierea produsului cumparat: {0}\n",desc1);
}
catch(System.Exception){};

//scoatem cantitatea cumparata

try
{
String qtty=vs[12];
end=qtty.LastIndexOf('"');
String qtty1=qtty.Substring(1,end-1);
//Console.WriteLine("Cantitatea achizitionata: {0}\n",qtty1);
}
catch(System.Exception){};

//scoatem pretul unitar
try
{
String pretu=vs[13];
end=pretu.LastIndexOf('"');
String pretu1=pretu.Substring(1,end-1);
//Console.WriteLine("Pretul unitar: {0}\n",pretu1);
}
catch(System.Exception){};

//scoatem procentul de discount acordat
try
{
String pdisc=vs[14];
end=pdisc.LastIndexOf('"');
String pdisc1=pdisc.Substring(1,end-1);
//Console.WriteLine("Procent discount: {0}\n",pdisc1);
}
catch(System.Exception){};

//scoatem valoare totala marfa fara TVA
try
{
String vtf=vs[15];
end=vtf.LastIndexOf('"');
String vtf1=vtf.Substring(1,end-1);
//Console.WriteLine("Valoarea marfii fara TVA: {0}\n",vtf1);
}
catch(System.Exception){};

//scoatem numarul facturii
try
{
String nrfac=vs[16];
end=nrfac.LastIndexOf('"');
String nrfac1=nrfac.Substring(1,end-1);
//Console.WriteLine("Numarul facturii: {0}\n",nrfac1);
}
catch(System.Exception){};

//scoatem codul tranzactiei
try
{
String codt=vs[17];
end=codt.LastIndexOf('"');
String codt1=codt.Substring(1,end-1);
//Console.WriteLine("Codul tranzactiei: {0}\n",codt1);
}
catch(System.Exception){};

//scoatem numele delegatului

try
{
String numed=vs[18];
end=numed.LastIndexOf('"');
String numed1=numed.Substring(1,end-1);
//Console.WriteLine("Numele delegatului: {0}\n",numed1);
}
catch(System.Exception){};

//scoatem nr masina

try
{
String cnr=vs[19];
end=cnr.LastIndexOf('"');
String cnr1=cnr.Substring(1,end-1);
//Console.WriteLine("Numarul masinii: {0}\n",cnr1);
}
catch(System.Exception){};
}
//Console.Read();

//sfarsit parte de fisier

try
{
odbcConnection1.Open();
//'111122','BAR','13','Coca-Cola mea','99','99','1111','0','109989','1'

//,Cfrdet_order_number,Cfrdet_line_code,Cfrdet_item_ code,Cfrdet_desc,Cfrdet_qty_order,Cfrdet_qty_recei ved,Cfrdet_price,Cfrdet_discount,Cfrdet_total,Cfrd et_from_po
OdbcCommand cmd=new OdbcCommand("insert into
cfrdet(Cfrdet_paking_slip,Cfrdet_order_number,Cfrd et_line_code,Cfrdet_item_code,Cfrdet_desc,Cfrdet_q ty_order,Cfrdet_qty_received,Cfrdet_price,Cfrdet_d iscount,Cfrdet_total,Cfrdet_from_po)"+
"values(?,?,?,?,?,?,?,?,?,?,?)",odbcConnection 1);
cmd.Parameters.Add("@nrpo",OdbcType.Text);
cmd.Parameters["@nrpo"].Value=nrpo1.ToString();

cmd.Parameters.Add("@nrfac",OdbcType.Text);
cmd.Parameters["@nrfac"].Value=nrfac1.ToString();

cmd.Parameters.Add("@lc",OdbcType.Text);
cmd.Parameters["@lc"].Value=lc1.ToString();

cmd.Parameters.Add("@ic",OdbcType.Text);
cmd.Parameters["@ic"].Value=ic1.ToString();

cmd.Parameters.Add("@desc",OdbcType.Text);
cmd.Parameters["@desc"].Value=desc1.ToString();

cmd.Parameters.Add("@",OdbcType);
cmd.Parameters["@"].Value=.ToString();

cmd.Parameters.Add("@",OdbcType);
cmd.Parameters["@"].Value=.ToString();

cmd.Parameters.Add("@",OdbcType);
cmd.Parameters["@"].Value=.ToString();

cmd.Parameters.Add("@",OdbcType);
cmd.Parameters["@"].Value=.ToString();

cmd.Parameters.Add("@",OdbcType);
cmd.Parameters["@"].Value=.ToString();

cmd.Parameters.Add("@",OdbcType);
cmd.Parameters["@"].Value=.ToString();

cmd.ExecuteNonQuery();
}
catch(OdbcException ex){}
finally
{
odbcConnection1.Close();
}

//
// TODO: Add any constructor code after InitializeComponent call
//
//Provider=MSDASQL.1;Persist Security Info=False;Extended
Properties="DSN=bdpo;DBQ=C:\CLARISYS040802\PPAK\DA TA4\BDPO;DefaultDir=C:\CLARISYS040802\PPAK\DATA4\B DPO;DriverId=538;FIL=Paradox
5.X;MaxBufferSize=2048;PageTimeout=5;"
}

/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}

#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.odbcConnection1 = new System.Data.Odbc.OdbcConnection();
this.odbcDataAdapter1 = new System.Data.Odbc.OdbcDataAdapter();
this.odbcSelectCommand1 = new System.Data.Odbc.OdbcCommand();
this.dataSet11 = new purchaseorder2.DataSet1();
this.label1 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.d ataSet11)).BeginInit();
this.SuspendLayout();
//
// odbcConnection1
//
this.odbcConnection1.ConnectionString = "MaxBufferSize=2048;FIL=Paradox
5.X;DSN=bdpo;PageTimeout=5;DefaultDir=C:\\CLARISYS 0" +
"40802\\PPAK\\DATA4\\BDPO;DBQ=C:\\CLARISYS040802\\ PPAK\\DATA4\\BDPO;DriverId=538";
//
// odbcDataAdapter1
//
this.odbcDataAdapter1.SelectCommand = this.odbcSelectCommand1;
this.odbcDataAdapter1.TableMappings.AddRange(new
System.Data.Common.DataTableMapping[] {
new System.Data.Common.DataTableMapping("Table",
"Table", new System.Data.Common.DataColumnMapping[] {
new
System.Data.Common.DataColumnMapping("Cfrdet_pakin g_slip",
"Cfrdet_paking_slip"),
new
System.Data.Common.DataColumnMapping("Cfrdet_line" , "Cfrdet_line"),
new
System.Data.Common.DataColumnMapping("Cfrdet_order _number",
"Cfrdet_order_number"),
new
System.Data.Common.DataColumnMapping("Cfrdet_line_ code", "Cfrdet_line_code"),
new
System.Data.Common.DataColumnMapping("Cfrdet_item_ code", "Cfrdet_item_code"),
new
System.Data.Common.DataColumnMapping("Cfrdet_desc" , "Cfrdet_desc"),
new
System.Data.Common.DataColumnMapping("Cfrdet_qty_o rder", "Cfrdet_qty_order"),
new
System.Data.Common.DataColumnMapping("Cfrdet_qty_r eceived",
"Cfrdet_qty_received"),
new
System.Data.Common.DataColumnMapping("Cfrdet_price ", "Cfrdet_price"),
new
System.Data.Common.DataColumnMapping("Cfrdet_disco unt", "Cfrdet_discount"),
new
System.Data.Common.DataColumnMapping("Cfrdet_total ", "Cfrdet_total"),
new
System.Data.Common.DataColumnMapping("Cfrdet_bin_l oc", "Cfrdet_bin_loc"),
new
System.Data.Common.DataColumnMapping("Cfrdet_from_ po", "Cfrdet_from_po"),
new
System.Data.Common.DataColumnMapping("Cfrdet_Cylin dersReceived",
"Cfrdet_CylindersReceived")})});
this.odbcDataAdapter1.RowUpdated += new
System.Data.Odbc.OdbcRowUpdatedEventHandler(this.o dbcDataAdapter1_RowUpdated);
//
// odbcSelectCommand1
//
this.odbcSelectCommand1.CommandText = "SELECT * FROM cfrdet";
this.odbcSelectCommand1.Connection = this.odbcConnection1;
//
// dataSet11
//
this.dataSet11.DataSetName = "DataSet1";
this.dataSet11.Locale = new System.Globalization.CultureInfo("en-US");
//
// label1
//
this.label1.Location = new System.Drawing.Point(40, 16);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(144, 40);
this.label1.TabIndex = 0;
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(504, 273);
this.Controls.Add(this.label1);
this.Name = "Form1";
this.Text = "Form1";
this.TransparencyKey = System.Drawing.Color.Silver;
this.Load += new System.EventHandler(this.Form1_Load);
((System.ComponentModel.ISupportInitialize)(this.d ataSet11)).EndInit();
this.ResumeLayout(false);

}
#endregion

/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Form1());

//DSN=bdpo;DBQ=C:\CLARISYS040802\PPAK\DATA4\BDPO;Def aultDir=C:\CLARISYS040802\PPAK\DATA4\BDPO;DriverId =538;FIL=Paradox
5.X;MaxBufferSize=2048;PageTimeout=5;

}

private void Form1_Load(object sender, System.EventArgs e)
{

}

private void odbcDataAdapter1_RowUpdated(object sender,
System.Data.Odbc.OdbcRowUpdatedEventArgs e)
{

}

private void dataGrid1_Navigate(object sender,
System.Windows.Forms.NavigateEventArgs ne)
{

}
}
}
"Sreejith S S Nair" wrote:
hi,
i can help you out provided you have to show me the code.

Nov 16 '05 #3
Sorry, last post I put an wrong code. This is the correct code:

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.Odbc;
using System.IO;

namespace purchaseorder2
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Data.Odbc.OdbcConnection odbcConnection1;
private System.Data.Odbc.OdbcDataAdapter odbcDataAdapter1;
private purchaseorder2.DataSet1 dataSet11;
private System.Data.Odbc.OdbcCommand odbcSelectCommand1;
private System.Windows.Forms.Label label1;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
//mai jos sunt variabilele in care avem informatiile din fisier
String nrpo1;
String cui1;
String numef1;
String data1;
String nrfac1;
String lc1;
String ic1;
String desc1;
String compid1;
String numecomp1;
String nrgest1;
String qtty1;
String pretu1;
String pdisc1;
String vtf1;
String codt1;
String numed1;
String cnr1;

public Form1()
{
//
// Required for Windows Form Designer support
//

InitializeComponent();
StreamReader sr=new StreamReader("C:\\poclarisys\\po-dupa
modificare.txt");
int end;
String result="";
char[] vc={','};
while((result=sr.ReadLine())!=null)
{
string[] vs;
//result=sr.ReadLine();
vs=result.Split(vc);
//scoatem din fisier nr ordinului de cumparare
String nrpo=vs[0];
try
{
end=nrpo.LastIndexOf('"');
nrpo1=nrpo.Substring(1,end-1);
//Console.WriteLine("Numarul ordinului de cumparare: {0}\n",nrpo1);
}
catch(System.Exception){}

//scoatem din fisier codul unic de identificare al furnizorului

try
{
String cui=vs[1];
end=cui.LastIndexOf('"');
cui1=cui.Substring(1,end-1);
//Console.WriteLine("Nr unic de identif furnizor: {0}\n",cui1);
}
catch(System.Exception){};

//scoatem numele furnizorului
try
{
String numef=vs[2];
end=numef.LastIndexOf('"');
numef1=numef.Substring(1,end-1);
//Console.WriteLine("Nume furnizor: {0}\n",numef1);
}
catch(System.Exception){};

//scoatem data tranzactiei

try
{
String data=vs[3];
end=data.LastIndexOf('"');
data1=data.Substring(1,end-1);
//Console.WriteLine("Data tranzactiei: {0}\n",data1);
}
catch(System.Exception){};

//scoatem identificatorul companiei

try
{
String compid=vs[6];
end=compid.LastIndexOf('"');
compid1=compid.Substring(1,end-1);
//Console.WriteLine("Nr de identif al companiei: {0}\n",compid1);
}
catch(System.Exception){};

//scoatem numele companiei
try
{
string numecomp=vs[7];
end=numecomp.LastIndexOf('"');
numecomp1=numecomp.Substring(1,end-1);
//Console.WriteLine("Numele companiei: {0}\n",numecomp1);
}
catch(System.Exception){};

//scoatem numarul gestiunii

try
{
String nrgest=vs[8];
end=nrgest.LastIndexOf('"');
nrgest1=nrgest.Substring(1,end-1);
//Console.WriteLine("Numarul gestuinii: {0}\n",nrgest1);
}
catch(System.Exception){};

//scoatem line code
try
{
String lc=vs[9];
end=lc.LastIndexOf('"');
lc1=lc.Substring(1,end-1);
//Console.WriteLine("Codul grupei de produse: {0}\n",lc1);
}
catch(System.Exception){};

//scoatem item code

try
{
String ic=vs[10];
end=ic.LastIndexOf('"');
ic1=ic.Substring(1,end-1);
//Console.WriteLine("Item code: {0}\n",ic1);
}
catch(System.Exception){};

//scoatem descrierea produsului

try
{
String desc=vs[11];
end=desc.LastIndexOf('"');
desc1=desc.Substring(1,end-1);
//Console.WriteLine("Descrierea produsului cumparat: {0}\n",desc1);
}
catch(System.Exception){};

//scoatem cantitatea cumparata

try
{
String qtty=vs[12];
end=qtty.LastIndexOf('"');
qtty1=qtty.Substring(1,end-1);
//Console.WriteLine("Cantitatea achizitionata: {0}\n",qtty1);
}
catch(System.Exception){};

//scoatem pretul unitar
try
{
String pretu=vs[13];
end=pretu.LastIndexOf('"');
pretu1=pretu.Substring(1,end-1);
//Console.WriteLine("Pretul unitar: {0}\n",pretu1);
}
catch(System.Exception){};

//scoatem procentul de discount acordat
try
{
String pdisc=vs[14];
end=pdisc.LastIndexOf('"');
pdisc1=pdisc.Substring(1,end-1);
//Console.WriteLine("Procent discount: {0}\n",pdisc1);
}
catch(System.Exception){};

//scoatem valoare totala marfa fara TVA
try
{
String vtf=vs[15];
end=vtf.LastIndexOf('"');
vtf1=vtf.Substring(1,end-1);
//Console.WriteLine("Valoarea marfii fara TVA: {0}\n",vtf1);
}
catch(System.Exception){};

//scoatem numarul facturii
try
{
String nrfac=vs[16];
end=nrfac.LastIndexOf('"');
nrfac1=nrfac.Substring(1,end-1);
//Console.WriteLine("Numarul facturii: {0}\n",nrfac1);
}
catch(System.Exception){};

//scoatem codul tranzactiei
try
{
String codt=vs[17];
end=codt.LastIndexOf('"');
codt1=codt.Substring(1,end-1);
//Console.WriteLine("Codul tranzactiei: {0}\n",codt1);
}
catch(System.Exception){};

//scoatem numele delegatului

try
{
String numed=vs[18];
end=numed.LastIndexOf('"');
numed1=numed.Substring(1,end-1);
//Console.WriteLine("Numele delegatului: {0}\n",numed1);
}
catch(System.Exception){};

//scoatem nr masina

try
{
String cnr=vs[19];
end=cnr.LastIndexOf('"');
cnr1=cnr.Substring(1,end-1);
//Console.WriteLine("Numarul masinii: {0}\n",cnr1);
}
catch(System.Exception){};

//Console.Read();

//sfarsit parte de fisier
try
{
odbcConnection1.Open();
//'111122','BAR','13','Coca-Cola mea','99','99','1111','0','109989','1'
//,Cfrdet_order_number,Cfrdet_line_code,Cfrdet_item_ code,Cfrdet_desc,Cfrdet_qty_order,Cfrdet_qty_recei ved,Cfrdet_price,Cfrdet_discount,Cfrdet_total,Cfrd et_from_po
OdbcCommand cmd=new OdbcCommand("insert into
cfrdet(Cfrdet_paking_slip,Cfrdet_order_number,Cfrd et_line_code,Cfrdet_item_code,Cfrdet_desc,Cfrdet_q ty_order,Cfrdet_qty_received,Cfrdet_price,Cfrdet_d iscount,Cfrdet_total,Cfrdet_from_po)"+
"values(?,?,?,?,?,?,?,?,?,?,?)",odbcConnection 1);
cmd.Parameters.Add("@nrfac",OdbcType.Text);
cmd.Parameters["@nrfac"].Value=nrfac1.ToString();

cmd.Parameters.Add("@nrpo",OdbcType.Text);
cmd.Parameters["@nrpo"].Value=nrpo1.ToString();

cmd.Parameters.Add("@lc",OdbcType.Text);
cmd.Parameters["@lc"].Value=lc1.ToString();

cmd.Parameters.Add("@ic",OdbcType.Text);
cmd.Parameters["@ic"].Value=ic1.ToString();

cmd.Parameters.Add("@desc",OdbcType.Text);
cmd.Parameters["@desc"].Value=desc1.ToString();

cmd.Parameters.Add("@qtty",OdbcType.Double);
cmd.Parameters["@qtty"].Value=Convert.ToDouble(qtty1);

cmd.Parameters.Add("@qtty2",OdbcType.Double);
cmd.Parameters["@qtty2"].Value=Convert.ToDouble(qtty1);

cmd.Parameters.Add("@pret",OdbcType.Double);
cmd.Parameters["@pret"].Value=Convert.ToDouble(pretu1);

cmd.Parameters.Add("@pdisc",OdbcType.Double);
cmd.Parameters["@pdisc"].Value=Convert.ToDouble(pdisc1);

cmd.Parameters.Add("@vtf",OdbcType.Double);
cmd.Parameters["@vtf"].Value=Convert.ToDouble(vtf1);

if(nrpo1!="")
{
cmd.Parameters.Add("@fpo",OdbcType.Bit);
cmd.Parameters["@fpo"].Value=1;
}
else
{
cmd.Parameters.Add("@fpo",OdbcType.Bit);
cmd.Parameters["@fpo"].Value=0;
}

cmd.ExecuteNonQuery();
cmd.Parameters.Clear();
}
catch(OdbcException ex){}
finally
{
odbcConnection1.Close();
}
}
//
// TODO: Add any constructor code after InitializeComponent call
//
//Provider=MSDASQL.1;Persist Security Info=False;Extended
Properties="DSN=bdpo;DBQ=C:\CLARISYS040802\PPAK\DA TA4\BDPO;DefaultDir=C:\CLARISYS040802\PPAK\DATA4\B DPO;DriverId=538;FIL=Paradox
5.X;MaxBufferSize=2048;PageTimeout=5;"
}

/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}

#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.odbcConnection1 = new System.Data.Odbc.OdbcConnection();
this.odbcDataAdapter1 = new System.Data.Odbc.OdbcDataAdapter();
this.odbcSelectCommand1 = new System.Data.Odbc.OdbcCommand();
this.dataSet11 = new purchaseorder2.DataSet1();
this.label1 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.d ataSet11)).BeginInit();
this.SuspendLayout();
//
// odbcConnection1
//
this.odbcConnection1.ConnectionString = "MaxBufferSize=2048;FIL=Paradox
5.X;DSN=bdpo;PageTimeout=5;DefaultDir=C:\\CLARISYS 0" +
"40802\\PPAK\\DATA4\\BDPO;DBQ=C:\\CLARISYS040802\\ PPAK\\DATA4\\BDPO;DriverId=538";
//
// odbcDataAdapter1
//
this.odbcDataAdapter1.SelectCommand = this.odbcSelectCommand1;
this.odbcDataAdapter1.TableMappings.AddRange(new
System.Data.Common.DataTableMapping[] {
new System.Data.Common.DataTableMapping("Table",
"Table", new System.Data.Common.DataColumnMapping[] {
new
System.Data.Common.DataColumnMapping("Cfrdet_pakin g_slip",
"Cfrdet_paking_slip"),
new
System.Data.Common.DataColumnMapping("Cfrdet_line" , "Cfrdet_line"),
new
System.Data.Common.DataColumnMapping("Cfrdet_order _number",
"Cfrdet_order_number"),
new
System.Data.Common.DataColumnMapping("Cfrdet_line_ code", "Cfrdet_line_code"),
new
System.Data.Common.DataColumnMapping("Cfrdet_item_ code", "Cfrdet_item_code"),
new
System.Data.Common.DataColumnMapping("Cfrdet_desc" , "Cfrdet_desc"),
new
System.Data.Common.DataColumnMapping("Cfrdet_qty_o rder", "Cfrdet_qty_order"),
new
System.Data.Common.DataColumnMapping("Cfrdet_qty_r eceived",
"Cfrdet_qty_received"),
new
System.Data.Common.DataColumnMapping("Cfrdet_price ", "Cfrdet_price"),
new
System.Data.Common.DataColumnMapping("Cfrdet_disco unt", "Cfrdet_discount"),
new
System.Data.Common.DataColumnMapping("Cfrdet_total ", "Cfrdet_total"),
new
System.Data.Common.DataColumnMapping("Cfrdet_bin_l oc", "Cfrdet_bin_loc"),
new
System.Data.Common.DataColumnMapping("Cfrdet_from_ po", "Cfrdet_from_po"),
new
System.Data.Common.DataColumnMapping("Cfrdet_Cylin dersReceived",
"Cfrdet_CylindersReceived")})});
this.odbcDataAdapter1.RowUpdated += new
System.Data.Odbc.OdbcRowUpdatedEventHandler(this.o dbcDataAdapter1_RowUpdated);
//
// odbcSelectCommand1
//
this.odbcSelectCommand1.CommandText = "SELECT * FROM cfrdet";
this.odbcSelectCommand1.Connection = this.odbcConnection1;
//
// dataSet11
//
this.dataSet11.DataSetName = "DataSet1";
this.dataSet11.Locale = new System.Globalization.CultureInfo("en-US");
//
// label1
//
this.label1.Location = new System.Drawing.Point(40, 16);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(144, 40);
this.label1.TabIndex = 0;
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(504, 273);
this.Controls.Add(this.label1);
this.Name = "Form1";
this.Text = "Form1";
this.TransparencyKey = System.Drawing.Color.Silver;
this.Load += new System.EventHandler(this.Form1_Load);
((System.ComponentModel.ISupportInitialize)(this.d ataSet11)).EndInit();
this.ResumeLayout(false);

}
#endregion

/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Form1());
//DSN=bdpo;DBQ=C:\CLARISYS040802\PPAK\DATA4\BDPO;Def aultDir=C:\CLARISYS040802\PPAK\DATA4\BDPO;DriverId =538;FIL=Paradox
5.X;MaxBufferSize=2048;PageTimeout=5;

}

private void Form1_Load(object sender, System.EventArgs e)
{

}

private void odbcDataAdapter1_RowUpdated(object sender,
System.Data.Odbc.OdbcRowUpdatedEventArgs e)
{

}

private void dataGrid1_Navigate(object sender,
System.Windows.Forms.NavigateEventArgs ne)
{

}
}
}


"Sreejith S S Nair" wrote:
hi,
i can help you out provided you have to show me the code.

Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Google Mike | last post by:
Tell me if this can be done, and if I have a misconception here. I am writing an app that will be served up in an app farm, and therefore I need to move the session information to the client, not...
4
by: George Stout | last post by:
First off I do not know alot about writing queries to an Access Database from an ASP page. This is why I need help. I have an Events database for 6 colleges in our metro area. On the homepage I...
6
by: Jeff Thies | last post by:
I've been thinking about writing CSS that's easy to read and adjust at a later date (often by someone else). Here's where I seem to be headed: Breaking the page down into container divs,...
0
by: sedefo | last post by:
I ran into this Microsoft Patterns & Practices Enterprise Library while i was researching how i can write a database independent data access layer. In my company we already use Data Access...
12
by: Chris Springer | last post by:
I'd like to get some feedback on the issue of storing data out to disk and where to store it. I've never been in a production environment in programming so you'll have to bear with me... My...
7
by: John Pote | last post by:
Hello, help/advice appreciated. Background: I am writing some web scripts in python to receive small amounts of data from remote sensors and store the data in a file. 50 to 100 bytes every 5 or...
8
by: Jon Harrop | last post by:
I am trying to learn C# and .NET programming in general but I am finding it very hard going. To start with, I'd like to translate some trivial functions from other languages that I am familiar with...
118
by: Chuck Cheeze | last post by:
This might be in the wrong group, but... Here is an example of my data: entry_id cat_id 1 20 2 25 3 30 4 25 5 35
30
by: Cramer | last post by:
I've finally gotton board with TDD (test driven development) and wow is it effective! I went from sceptic to True Believer with my first effort. My question: According to the various books and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.