Wednesday, June 30, 2010

COS 103 DATA SOURCE POS SYSTEM

CTRL+ T
ADODC
MICROSOFT ADO DATA CONTROL 6.0 (OLEDB)
CLICK OK
RIGHT CLICK ADODC
CLICK PROPERTIES
CLICK BUILD BUTTON
CLICK OK
SELECT OR ENTER A DATABASE NAME
TEST CONNECTION
CLICK OK
CLICK RECORDSOURCE TAB
UNDER COMMAND TYPE
SELECT 2- ADCMDTABLE
SELECT TABLE OR STORED PROCEDURE NAME
ENTER OR SELECT TABLE NAME
CLICK APPLY
CLICK OK

ADD TO ADD TO CHART COMMAND BUTTON




Private Sub Command1_Click()
Adodc2.Recordset.AddNew
Adodc2.Recordset.Fields(0) = Adodc1.Recordset.Fields(0)
Adodc2.Recordset.Fields(1) = Adodc1.Recordset.Fields(1)
Adodc2.Recordset.Fields(2) = Adodc1.Recordset.Fields(2) * Val(Text1)
Adodc2.Recordset.Fields(0) = Text1
Adodc2.Recordset.Update
MsgBox "ITEM ADDED"
Adodc2.Refresh
DataGrid2.Refresh

End Sub

Private Sub Command2_Click()
Unload Me

End Sub

No comments:

Post a Comment

My PIcTures