amigo02
Programmer
- Feb 19, 2003
- 109
I am trying to export data to peachtree from a custom vb application. This could either be with pervasive odbc or BTRIEVE API.
I used odbc connection successfully to read data but I was unable to post data into peachtree. The code is below..
Private Sub Command3_Click()
Dim sConnect As String
Dim Conn As ADODB.Connection
Dim RS As ADODB.Recordset
sConnect = "DSN=PEACH3"
Set Conn = New ADODB.Connection
Conn.Open sConnect, "", ""
Set RS = New ADODB.Recordset
sSQL = "Select * from CUSTOMERS"
RS.Open sSQL, Conn, adOpenStatic, adLockBatchOptimistic, 1
RS.AddNew
RS("Customer_Bill_Name") = "ABC Company"
RS.Update
RS.MoveFirst
List1.AddItem Err.Description
Do While Not RS.EOF
List1.AddItem RS(0)
RS.MoveNext
Loop
End Sub
If you have any code fragments with BTRIEVE API I would appreciate that also..
I used odbc connection successfully to read data but I was unable to post data into peachtree. The code is below..
Private Sub Command3_Click()
Dim sConnect As String
Dim Conn As ADODB.Connection
Dim RS As ADODB.Recordset
sConnect = "DSN=PEACH3"
Set Conn = New ADODB.Connection
Conn.Open sConnect, "", ""
Set RS = New ADODB.Recordset
sSQL = "Select * from CUSTOMERS"
RS.Open sSQL, Conn, adOpenStatic, adLockBatchOptimistic, 1
RS.AddNew
RS("Customer_Bill_Name") = "ABC Company"
RS.Update
RS.MoveFirst
List1.AddItem Err.Description
Do While Not RS.EOF
List1.AddItem RS(0)
RS.MoveNext
Loop
End Sub
If you have any code fragments with BTRIEVE API I would appreciate that also..