B
Butt Chin Chuan
I want to put my eVB application into my pocket pc 2002
(ipaq h3850). I faced this problem where I'm using the
simpleRDA program by Microsoft to pull the table. I have
created a new project for PPC 2002 and add the file into
this project. Next, I make sure the settings is correct
(url, name of database etc). I use SSCE Relay here. I got
this message "There is an error while running this
program" when I clicked on the combo box. This will
execute the following procedures:
Private Sub cmbSourceTables_Click()
Dim strTableName As String
strTableName = cmbSourceTables.List
(cmbSourceTables.ListIndex)
txtSyncCommand.Text = "Select * From " & strTableName
txtLocalTableName.Text = strTableName
' we only have error tables for non tracked operations
'
If optNonTracked.Value = False Then
txtErrorTableName.Text = strTableName & "_Err"
End If
End Sub
'----------------------------------------------------------
-------------
' Sub cmbSourceTables_DropDown
'
' On the first drop down populate the drop down with a
list
' of avaliable server table names for use in a Pull
operation.
'
Private Sub cmbSourceTables_DropDown()
If chk_rda_props = False Then
cmbSourceTables.Clear
cmbSourceTables.AddItem "RDA properties not set"
Exit Sub
End If
If cmbSourceTables.ListCount = 0 Then
populate_pullsource
End If
End Sub
'----------------------------------------------------------
-------------
' Function populate_pullsource
'
' Use the RDA Pull method to create an populate a local
table
' that holds the name of all the server table objects
and then
' populate a the cmbSourceTables drop down combo.
'
Private Sub populate_pullsource()
Dim rs As ADOCE.Recordset
On Error Resume Next
cmbSourceTables.Clear
open_connection
cn.Execute (strDropPullSource)
On Error GoTo 0
' create a local table contain the available source
tables
close_connection
rda.Pull strPullTable, strSchemaTables, strRemoteConn,
TRACKINGOFF
' if an error occurred then display the RDA errors
'
If Err.Number <> 0 Then
Call show_rda_errs
close_connection
Exit Sub
End If
On Error GoTo 0
open_connection
Set rs = Nothing
' execute the command text showing any errors which
may have occurred
'
Set rs = cn.Execute(strServerTables)
' test for command errors
'
If cn.Errors.Count > 0 Then
show_errs
Exit Sub
End If
cmbSourceTables.AddItem ""
Do While Not rs.EOF
cmbSourceTables.AddItem rs(0).Value
rs.MoveNext
Loop
Set rs = Nothing
On Error GoTo 0
End Sub
Of the above statements, I managed to trace the problem
using message box pop up. It gives me error messages in
this statement:
rda.Pull strPullTable, strSchemaTables, strRemoteConn,
TRACKINGOFF
Where have I gone wrong?
I suspect that this problem maybe because my computer now
also installed VS.Net. Then again, I thought they should
be working without problems. I tried to pull a table
within VB.Net and it work successfully. However, it
doesn't work in eVB.
Anyone have any idea what happened? Thank you.
(ipaq h3850). I faced this problem where I'm using the
simpleRDA program by Microsoft to pull the table. I have
created a new project for PPC 2002 and add the file into
this project. Next, I make sure the settings is correct
(url, name of database etc). I use SSCE Relay here. I got
this message "There is an error while running this
program" when I clicked on the combo box. This will
execute the following procedures:
Private Sub cmbSourceTables_Click()
Dim strTableName As String
strTableName = cmbSourceTables.List
(cmbSourceTables.ListIndex)
txtSyncCommand.Text = "Select * From " & strTableName
txtLocalTableName.Text = strTableName
' we only have error tables for non tracked operations
'
If optNonTracked.Value = False Then
txtErrorTableName.Text = strTableName & "_Err"
End If
End Sub
'----------------------------------------------------------
-------------
' Sub cmbSourceTables_DropDown
'
' On the first drop down populate the drop down with a
list
' of avaliable server table names for use in a Pull
operation.
'
Private Sub cmbSourceTables_DropDown()
If chk_rda_props = False Then
cmbSourceTables.Clear
cmbSourceTables.AddItem "RDA properties not set"
Exit Sub
End If
If cmbSourceTables.ListCount = 0 Then
populate_pullsource
End If
End Sub
'----------------------------------------------------------
-------------
' Function populate_pullsource
'
' Use the RDA Pull method to create an populate a local
table
' that holds the name of all the server table objects
and then
' populate a the cmbSourceTables drop down combo.
'
Private Sub populate_pullsource()
Dim rs As ADOCE.Recordset
On Error Resume Next
cmbSourceTables.Clear
open_connection
cn.Execute (strDropPullSource)
On Error GoTo 0
' create a local table contain the available source
tables
close_connection
rda.Pull strPullTable, strSchemaTables, strRemoteConn,
TRACKINGOFF
' if an error occurred then display the RDA errors
'
If Err.Number <> 0 Then
Call show_rda_errs
close_connection
Exit Sub
End If
On Error GoTo 0
open_connection
Set rs = Nothing
' execute the command text showing any errors which
may have occurred
'
Set rs = cn.Execute(strServerTables)
' test for command errors
'
If cn.Errors.Count > 0 Then
show_errs
Exit Sub
End If
cmbSourceTables.AddItem ""
Do While Not rs.EOF
cmbSourceTables.AddItem rs(0).Value
rs.MoveNext
Loop
Set rs = Nothing
On Error GoTo 0
End Sub
Of the above statements, I managed to trace the problem
using message box pop up. It gives me error messages in
this statement:
rda.Pull strPullTable, strSchemaTables, strRemoteConn,
TRACKINGOFF
Where have I gone wrong?
I suspect that this problem maybe because my computer now
also installed VS.Net. Then again, I thought they should
be working without problems. I tried to pull a table
within VB.Net and it work successfully. However, it
doesn't work in eVB.
Anyone have any idea what happened? Thank you.