Dear ADezii
i,m totlally new for vb 6.0 and i,m doing a invoice project and i,m facing a issue , can you plz tell me solution
i,m trying to retrive some datas from sql Product table
it contains following fields
ItemNo int,Descrption varchar(20),Sup id int,SupName varchar(20),Pur price float,SalPrice float,QtyIn int,QtySold int
i,m trying to retrive some datas from sql Product table
in a Textbox
so
txtItem1.Text txtDes1.Text txtQty1.Text txtRate1.Text
txtItem2.Text txtDes2.Text txtQty2.Text txtRate2.Text
txtItem3.Text txtDes3.Text txtQty3.Text txtRate3.Text
so i write this coding in my txtItem_Clisk event
a = o
n = Val(txtItem1.Te xt)
adoproduct.Reco rdset.MoveFirst
Do While Not adoproduct.Reco rdset.EOF
If adoproduct.Reco rdset.Fields("I temNo") = Val(n) Then
txtDescrp1.Text = adoproduct.Reco rdset.Fields("D escrp")
txtPrice1.Text = adoproduct.Reco rdset.Fields("P urprice")
txtQty1.Text = adoproduct.Reco rdset.Fields("Q tyIn")
a = 1
End If
adoproduct.Reco rdset.MoveNext
Loop
If a = 0 Then
MsgBox "Item No Mismatch"
End If
adoproduct.Refr esh
and i used the same coding with changed the txtbox name in also other 2 txtbox click event
when i run my form it showed me the error msg
"Run time error 2147217842(8004 0e4e)
Opreation was canceled
and when i clicked the debug it showed me the
ItemNo,Purprice ,QtyIn and the Description column in sql automattically deleted, if i click the 2nd button it running fine
so whats the problem and how can i solve this
plz i need ur help
i,m totlally new for vb 6.0 and i,m doing a invoice project and i,m facing a issue , can you plz tell me solution
i,m trying to retrive some datas from sql Product table
it contains following fields
ItemNo int,Descrption varchar(20),Sup id int,SupName varchar(20),Pur price float,SalPrice float,QtyIn int,QtySold int
i,m trying to retrive some datas from sql Product table
in a Textbox
so
txtItem1.Text txtDes1.Text txtQty1.Text txtRate1.Text
txtItem2.Text txtDes2.Text txtQty2.Text txtRate2.Text
txtItem3.Text txtDes3.Text txtQty3.Text txtRate3.Text
so i write this coding in my txtItem_Clisk event
a = o
n = Val(txtItem1.Te xt)
adoproduct.Reco rdset.MoveFirst
Do While Not adoproduct.Reco rdset.EOF
If adoproduct.Reco rdset.Fields("I temNo") = Val(n) Then
txtDescrp1.Text = adoproduct.Reco rdset.Fields("D escrp")
txtPrice1.Text = adoproduct.Reco rdset.Fields("P urprice")
txtQty1.Text = adoproduct.Reco rdset.Fields("Q tyIn")
a = 1
End If
adoproduct.Reco rdset.MoveNext
Loop
If a = 0 Then
MsgBox "Item No Mismatch"
End If
adoproduct.Refr esh
and i used the same coding with changed the txtbox name in also other 2 txtbox click event
when i run my form it showed me the error msg
"Run time error 2147217842(8004 0e4e)
Opreation was canceled
and when i clicked the debug it showed me the
ItemNo,Purprice ,QtyIn and the Description column in sql automattically deleted, if i click the 2nd button it running fine
so whats the problem and how can i solve this
plz i need ur help
Comment