Problems using ADOCE 
Author Message
 Problems using ADOCE

I am having tom problems trying to write an application for a PocketPC
handheld device.  What I want to do is have the handheld user connect to a
SQL 2000 database via a radio link and then view, edit & add new records
back to the SQL database - not rocket science....

If this is possible could somebody show me how to do this please?

Having not found a way to do this I thought I would export from my SQL
database to an .mdb & have this database synchronise with a .cdb file on the
PocketPC; again not rocket science....

The way Im trying to do this is using Embedded VB and testing on a pocketPC
emulator.  Using this method this work just fine in the emulator but when I
deploy it to the Pocket PC I get confusing results.  An example of my code
is:

    Dim cn As ADOCE.Connection
    Dim sConnect As String

    Set cn = CreateObject("ADOCE.Connection.3.0")
    sConnect = "\My Documents\stockcontrol.cdb"
    cn.Open sConnect

On the emulator this goes off and opens a connection to my stockcontrol
.cdb.  I then open a ADOCE recordset and scrole through the records of the
Supplier table and list them in a listbox.

Having got this far I run the Application Install Wizard and installed my
app with the .cdb file onto my handheld.  When I run the app on this, I get
an erro when trying to open the connection that says "error opening
connection Database '\My Documents\stockcontrol.cdb' already exists."  The
app then goes on to open my recordset and show me a list of Suppliers from
the Suppler table.  Im not sure why this happens.  I had previously
synchronised my StockControl.mdb using active synch and when I look from my
PC and browse to Mobile Device\Databases, I can see a list of tables from my
StockControl.mdb database - which is where I am assuming my list of
suppliers is being read from.

All of this is quite confusing but i think if the following questions could
be answered it would help me on my way
1) Why am I getting the "error opening connection Database '\My
Documents\stockcontrol.cdb' already exists." error when all im trying to do
is open a connection?
2) How do I develop effectively using the emulator if I get different
results when I run the app on the handheld.
3) How do I delete the tables that appear in the Databases folder when
browsing to Mobile Device from PC (how do I delete databases)?
4) I can't seem to run my projects with Pocket PC (Default Device) selected
as the target device (program hangs with message 'Connecting to Remote
Device').
5) How can I connect directly to a SQL Server 2000 database?
6) Where are the best sources of help on programming for PocketPC devices
using Embedded VB?

Many thanks for all help given

Terry Holland



Tue, 09 Nov 2004 21:02:50 GMT  
 Problems using ADOCE
http://www.microsoft.com/mobile/developer/dev_idx.asp
http://www.pocketpcdn.com
http://www.devbuzz.com/content/init_sqlce_starting_out.asp
microsoft.public.sqlserver.ce


Quote:
> I am having tom problems trying to write an application for a PocketPC
> handheld device.  What I want to do is have the handheld user connect to a
> SQL 2000 database via a radio link and then view, edit & add new records
> back to the SQL database - not rocket science....

> If this is possible could somebody show me how to do this please?

> Having not found a way to do this I thought I would export from my SQL
> database to an .mdb & have this database synchronise with a .cdb file on
the
> PocketPC; again not rocket science....

> The way Im trying to do this is using Embedded VB and testing on a
pocketPC
> emulator.  Using this method this work just fine in the emulator but when
I
> deploy it to the Pocket PC I get confusing results.  An example of my code
> is:

>     Dim cn As ADOCE.Connection
>     Dim sConnect As String

>     Set cn = CreateObject("ADOCE.Connection.3.0")
>     sConnect = "\My Documents\stockcontrol.cdb"
>     cn.Open sConnect

> On the emulator this goes off and opens a connection to my stockcontrol
> .cdb.  I then open a ADOCE recordset and scrole through the records of the
> Supplier table and list them in a listbox.

> Having got this far I run the Application Install Wizard and installed my
> app with the .cdb file onto my handheld.  When I run the app on this, I
get
> an erro when trying to open the connection that says "error opening
> connection Database '\My Documents\stockcontrol.cdb' already exists."  The
> app then goes on to open my recordset and show me a list of Suppliers from
> the Suppler table.  Im not sure why this happens.  I had previously
> synchronised my StockControl.mdb using active synch and when I look from
my
> PC and browse to Mobile Device\Databases, I can see a list of tables from
my
> StockControl.mdb database - which is where I am assuming my list of
> suppliers is being read from.

> All of this is quite confusing but i think if the following questions
could
> be answered it would help me on my way
> 1) Why am I getting the "error opening connection Database '\My
> Documents\stockcontrol.cdb' already exists." error when all im trying to
do
> is open a connection?
> 2) How do I develop effectively using the emulator if I get different
> results when I run the app on the handheld.
> 3) How do I delete the tables that appear in the Databases folder when
> browsing to Mobile Device from PC (how do I delete databases)?
> 4) I can't seem to run my projects with Pocket PC (Default Device)
selected
> as the target device (program hangs with message 'Connecting to Remote
> Device').
> 5) How can I connect directly to a SQL Server 2000 database?
> 6) Where are the best sources of help on programming for PocketPC devices
> using Embedded VB?

> Many thanks for all help given

> Terry Holland



Wed, 10 Nov 2004 00:12:49 GMT  
 Problems using ADOCE
Terry,

your main problem is that you can't get your cdb going on your PDA.
The cdb's used in the emulator are not suitable for PDAs.
You'll have to copy your mdb in a directory of your pda while it is
connected to your pc.
doing this, there will pop up a dialogue in which you can configure the sync
behaviour.

hth,

Michael

www.piranhasoft.de



Quote:
> I am having tom problems trying to write an application for a PocketPC
> handheld device.  What I want to do is have the handheld user connect to a
> SQL 2000 database via a radio link and then view, edit & add new records
> back to the SQL database - not rocket science....

> If this is possible could somebody show me how to do this please?

> Having not found a way to do this I thought I would export from my SQL
> database to an .mdb & have this database synchronise with a .cdb file on
the
> PocketPC; again not rocket science....

> The way Im trying to do this is using Embedded VB and testing on a
pocketPC
> emulator.  Using this method this work just fine in the emulator but when
I
> deploy it to the Pocket PC I get confusing results.  An example of my code
> is:

>     Dim cn As ADOCE.Connection
>     Dim sConnect As String

>     Set cn = CreateObject("ADOCE.Connection.3.0")
>     sConnect = "\My Documents\stockcontrol.cdb"
>     cn.Open sConnect

> On the emulator this goes off and opens a connection to my stockcontrol
> .cdb.  I then open a ADOCE recordset and scrole through the records of the
> Supplier table and list them in a listbox.

> Having got this far I run the Application Install Wizard and installed my
> app with the .cdb file onto my handheld.  When I run the app on this, I
get
> an erro when trying to open the connection that says "error opening
> connection Database '\My Documents\stockcontrol.cdb' already exists."  The
> app then goes on to open my recordset and show me a list of Suppliers from
> the Suppler table.  Im not sure why this happens.  I had previously
> synchronised my StockControl.mdb using active synch and when I look from
my
> PC and browse to Mobile Device\Databases, I can see a list of tables from
my
> StockControl.mdb database - which is where I am assuming my list of
> suppliers is being read from.

> All of this is quite confusing but i think if the following questions
could
> be answered it would help me on my way
> 1) Why am I getting the "error opening connection Database '\My
> Documents\stockcontrol.cdb' already exists." error when all im trying to
do
> is open a connection?
> 2) How do I develop effectively using the emulator if I get different
> results when I run the app on the handheld.
> 3) How do I delete the tables that appear in the Databases folder when
> browsing to Mobile Device from PC (how do I delete databases)?
> 4) I can't seem to run my projects with Pocket PC (Default Device)
selected
> as the target device (program hangs with message 'Connecting to Remote
> Device').
> 5) How can I connect directly to a SQL Server 2000 database?
> 6) Where are the best sources of help on programming for PocketPC devices
> using Embedded VB?

> Many thanks for all help given

> Terry Holland



Wed, 10 Nov 2004 03:59:45 GMT  
 Problems using ADOCE
But Im still very confused as to why Im getting the "error opening
connection Database '\My

Documents\stockcontrol.cdb' already exists." error when all im trying to do
is open a connection?

I know the database exists - thats the one I want to open! It seems as
though the instruction is telling the PDA to create a database??

Terry


Quote:
> Terry,

> your main problem is that you can't get your cdb going on your PDA.
> The cdb's used in the emulator are not suitable for PDAs.
> You'll have to copy your mdb in a directory of your pda while it is
> connected to your pc.
> doing this, there will pop up a dialogue in which you can configure the

sync

Quote:
> behaviour.

> hth,

> Michael

> www.piranhasoft.de



> > I am having tom problems trying to write an application for a PocketPC
> > handheld device. What I want to do is have the handheld user connect to

a

Quote:
> > SQL 2000 database via a radio link and then view, edit & add new records
> > back to the SQL database - not rocket science....

> > If this is possible could somebody show me how to do this please?

> > Having not found a way to do this I thought I would export from my SQL
> > database to an .mdb & have this database synchronise with a .cdb file on
> the
> > PocketPC; again not rocket science....

> > The way Im trying to do this is using Embedded VB and testing on a
> pocketPC
> > emulator. Using this method this work just fine in the emulator but when
> I
> > deploy it to the Pocket PC I get confusing results. An example of my

code

Quote:
> > is:

> > Dim cn As ADOCE.Connection
> > Dim sConnect As String

> > Set cn = CreateObject("ADOCE.Connection.3.0")
> > sConnect = "\My Documents\stockcontrol.cdb"
> > cn.Open sConnect

> > On the emulator this goes off and opens a connection to my stockcontrol
> > .cdb. I then open a ADOCE recordset and scrole through the records of

the

Quote:
> > Supplier table and list them in a listbox.

> > Having got this far I run the Application Install Wizard and installed

my

Quote:
> > app with the .cdb file onto my handheld. When I run the app on this, I
> get
> > an erro when trying to open the connection that says "error opening
> > connection Database '\My Documents\stockcontrol.cdb' already exists."

The

Quote:
> > app then goes on to open my recordset and show me a list of Suppliers

from

Quote:
> > the Suppler table. Im not sure why this happens. I had previously
> > synchronised my StockControl.mdb using active synch and when I look from
> my
> > PC and browse to Mobile Device\Databases, I can see a list of tables

from

Quote:
> my
> > StockControl.mdb database - which is where I am assuming my list of
> > suppliers is being read from.

> > All of this is quite confusing but i think if the following questions
> could
> > be answered it would help me on my way
> > 1) Why am I getting the "error opening connection Database '\My
> > Documents\stockcontrol.cdb' already exists." error when all im trying to
> do
> > is open a connection?
> > 2) How do I develop effectively using the emulator if I get different
> > results when I run the app on the handheld.
> > 3) How do I delete the tables that appear in the Databases folder when
> > browsing to Mobile Device from PC (how do I delete databases)?
> > 4) I can't seem to run my projects with Pocket PC (Default Device)
> selected
> > as the target device (program hangs with message 'Connecting to Remote
> > Device').
> > 5) How can I connect directly to a SQL Server 2000 database?
> > 6) Where are the best sources of help on programming for PocketPC

devices

Quote:
> > using Embedded VB?

> > Many thanks for all help given

> > Terry Holland




- Show quoted text -

Quote:
> Terry,

> your main problem is that you can't get your cdb going on your PDA.
> The cdb's used in the emulator are not suitable for PDAs.
> You'll have to copy your mdb in a directory of your pda while it is
> connected to your pc.
> doing this, there will pop up a dialogue in which you can configure the
sync
> behaviour.

> hth,

> Michael

> www.piranhasoft.de



> > I am having tom problems trying to write an application for a PocketPC
> > handheld device.  What I want to do is have the handheld user connect to
a
> > SQL 2000 database via a radio link and then view, edit & add new records
> > back to the SQL database - not rocket science....

> > If this is possible could somebody show me how to do this please?

> > Having not found a way to do this I thought I would export from my SQL
> > database to an .mdb & have this database synchronise with a .cdb file on
> the
> > PocketPC; again not rocket science....

> > The way Im trying to do this is using Embedded VB and testing on a
> pocketPC
> > emulator.  Using this method this work just fine in the emulator but
when
> I
> > deploy it to the Pocket PC I get confusing results.  An example of my
code
> > is:

> >     Dim cn As ADOCE.Connection
> >     Dim sConnect As String

> >     Set cn = CreateObject("ADOCE.Connection.3.0")
> >     sConnect = "\My Documents\stockcontrol.cdb"
> >     cn.Open sConnect

> > On the emulator this goes off and opens a connection to my stockcontrol
> > .cdb.  I then open a ADOCE recordset and scrole through the records of
the
> > Supplier table and list them in a listbox.

> > Having got this far I run the Application Install Wizard and installed
my
> > app with the .cdb file onto my handheld.  When I run the app on this, I
> get
> > an erro when trying to open the connection that says "error opening
> > connection Database '\My Documents\stockcontrol.cdb' already exists."
The
> > app then goes on to open my recordset and show me a list of Suppliers
from
> > the Suppler table.  Im not sure why this happens.  I had previously
> > synchronised my StockControl.mdb using active synch and when I look from
> my
> > PC and browse to Mobile Device\Databases, I can see a list of tables
from
> my
> > StockControl.mdb database - which is where I am assuming my list of
> > suppliers is being read from.

> > All of this is quite confusing but i think if the following questions
> could
> > be answered it would help me on my way
> > 1) Why am I getting the "error opening connection Database '\My
> > Documents\stockcontrol.cdb' already exists." error when all im trying to
> do
> > is open a connection?
> > 2) How do I develop effectively using the emulator if I get different
> > results when I run the app on the handheld.
> > 3) How do I delete the tables that appear in the Databases folder when
> > browsing to Mobile Device from PC (how do I delete databases)?
> > 4) I can't seem to run my projects with Pocket PC (Default Device)
> selected
> > as the target device (program hangs with message 'Connecting to Remote
> > Device').
> > 5) How can I connect directly to a SQL Server 2000 database?
> > 6) Where are the best sources of help on programming for PocketPC
devices
> > using Embedded VB?

> > Many thanks for all help given

> > Terry Holland



Thu, 11 Nov 2004 20:28:02 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Problems using ADOCE databases in VB

2. Accessing a .CDB PocketPC database using VB6 with ADOCE

3. Creating Database using ADOCE.3.1

4. ADOCE Index using eVB??

5. Cannot create a Table using ADOCE

6. adoce problems....

7. Problem with ADOCE recordset

8. ADOCE Problem

9. More problems with performance on ADOCE...

10. ADOCE Problem

11. Datetime problems with adoce 3.0

12. problem with datetime in ADOCE 3.0

 

 
Powered by phpBB® Forum Software