dbTalk Databases Forums  

how to stop bd, server or drop connections on pocket pc?

sybase.public.sqlanywhere.general sybase.public.sqlanywhere.general


Discuss how to stop bd, server or drop connections on pocket pc? in the sybase.public.sqlanywhere.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Katie
 
Posts: n/a

Default how to stop bd, server or drop connections on pocket pc? - 12-05-2003 , 10:36 AM






I'm trying to disconnect from my running database on a pocket pc using the
various methods below. Nothing I tried has worked although the documentation
says it should. Is there a known BUG or BUGS with this database server on
pocket pc devices? I can't believe something so simple is such a problem.
Makes me think Sybase anywhere isn't as good as they say it is. I tried the
following methods...



Closing all my ADO.NET connections (doesn't work)

STOP DATABASE UNCONDITIONALLY (doesn't work)

STOP ENGINE UNCONDITIONALLY (doesn't work)

DROP CONNECTION connectionNumber (doesn't work)



Does anyone know how i cam stop the database or server or drop all
connections so I can copy and move the database file from my program code?



Thanks!



VERY VERY FRUSTRATED WITH SYBASE!!!





Reply With Quote
  #2  
Old   
Breck Carter [TeamSybase]
 
Posts: n/a

Default Re: how to stop bd, server or drop connections on pocket pc? - 12-05-2003 , 12:14 PM






When you say "doesn't work", what is the symptom? Please show us the
exact code you are using, and the exact error messages or other
symptoms you are getting.

Closing all the connections should cause the engine to stop if the
engine was started with AutoStop set to Yes.

AFAIK this stuff all works as advertised.

Breck

On 5 Dec 2003 08:36:26 -0800, "Katie" <j__i__m1 (AT) hotmail (DOT) com> wrote:

Quote:
I'm trying to disconnect from my running database on a pocket pc using the
various methods below. Nothing I tried has worked although the documentation
says it should. Is there a known BUG or BUGS with this database server on
pocket pc devices? I can't believe something so simple is such a problem.
Makes me think Sybase anywhere isn't as good as they say it is. I tried the
following methods...



Closing all my ADO.NET connections (doesn't work)

STOP DATABASE UNCONDITIONALLY (doesn't work)

STOP ENGINE UNCONDITIONALLY (doesn't work)

DROP CONNECTION connectionNumber (doesn't work)



Does anyone know how i cam stop the database or server or drop all
connections so I can copy and move the database file from my program code?



Thanks!



VERY VERY FRUSTRATED WITH SYBASE!!!



--
bcarter (AT) risingroad (DOT) com
Mobile and Distributed Enterprise Database Applications
www.risingroad.com


Reply With Quote
  #3  
Old   
Katie
 
Posts: n/a

Default Re: how to stop bd, server or drop connections on pocket pc? - 12-05-2003 , 12:51 PM



I get various errors but mostly i get Cant Start/Stop database...

i tried disconnection from my ADO.NET connection using the test code below.
I get an IOException when i try to move the file. because the db hasn't
stopped.

conn = new AsaConnection("DBF=\\Program
Files\\Demo\\DBDemo.db;UID=DBA;PWD=SQL;AutoStop=YE S;start=\\Program
Files\\Sybase\\ASA\\dbsrv9.exe -q" );
conn.Open();

....

conn.Close();
Thread.Sleep(4000);
//code to move file
....

I also tried these methods...
//////////////////////
cmdDevice = new AsaCommand("SELECT connection_property( 'number' )", conn);
AsaDataReader reader = cmdDevice.ExecuteReader();
if (reader.Read())
{
strConnNum = reader.GetString( 0 );
}
reader.Close();
cmdDevice = new AsaCommand("DROP CONNECTION " + strConnNum, conn);
cmdDevice.ExecuteNonQuery();
/////////////////////

//////////////////// This should work even from the current connection!
cmdDevice = new AsaCommand("STOP ENGINE UNCONDITIONALLY", conn);
cmdDevice.ExecuteNonQuery();
////////////////////

/////////////////// This should work but from a different DB connection!
cmdDevice = new AsaCommand("STOP DATABASE DBDemo UNCONDITIONALLY", conn);
cmdDevice.ExecuteNonQuery();
///////////////////

"Breck Carter [TeamSybase]" <NOSPAM__bcarter (AT) risingroad (DOT) com> wrote in
message newsnh1tv8g7gudn91ln3tlmtl7uua3cpr5cg (AT) 4ax (DOT) com...
Quote:
When you say "doesn't work", what is the symptom? Please show us the
exact code you are using, and the exact error messages or other
symptoms you are getting.

Closing all the connections should cause the engine to stop if the
engine was started with AutoStop set to Yes.

AFAIK this stuff all works as advertised.

Breck

On 5 Dec 2003 08:36:26 -0800, "Katie" <j__i__m1 (AT) hotmail (DOT) com> wrote:

I'm trying to disconnect from my running database on a pocket pc using
the
various methods below. Nothing I tried has worked although the
documentation
says it should. Is there a known BUG or BUGS with this database server on

pocket pc devices? I can't believe something so simple is such a problem.
Makes me think Sybase anywhere isn't as good as they say it is. I tried
the
following methods...



Closing all my ADO.NET connections (doesn't work)

STOP DATABASE UNCONDITIONALLY (doesn't work)

STOP ENGINE UNCONDITIONALLY (doesn't work)

DROP CONNECTION connectionNumber (doesn't work)



Does anyone know how i cam stop the database or server or drop all
connections so I can copy and move the database file from my program
code?



Thanks!



VERY VERY FRUSTRATED WITH SYBASE!!!




--
bcarter (AT) risingroad (DOT) com
Mobile and Distributed Enterprise Database Applications
www.risingroad.com



Reply With Quote
  #4  
Old   
Katie
 
Posts: n/a

Default Re: how to stop bd, server or drop connections on pocket pc? - 12-05-2003 , 01:04 PM



correction... I'm not moving the file i'm just trying to create a copy. i
do know that it is read only....

"Katie" <j__i__m1 (AT) hotmail (DOT) com> wrote

Quote:
I get various errors but mostly i get Cant Start/Stop database...

i tried disconnection from my ADO.NET connection using the test code
below.
I get an IOException when i try to move the file. because the db hasn't
stopped.

conn = new AsaConnection("DBF=\\Program
Files\\Demo\\DBDemo.db;UID=DBA;PWD=SQL;AutoStop=YE S;start=\\Program
Files\\Sybase\\ASA\\dbsrv9.exe -q" );
conn.Open();

...

conn.Close();
Thread.Sleep(4000);
//code to move file
...

I also tried these methods...
//////////////////////
cmdDevice = new AsaCommand("SELECT connection_property( 'number' )",
conn);
AsaDataReader reader = cmdDevice.ExecuteReader();
if (reader.Read())
{
strConnNum = reader.GetString( 0 );
}
reader.Close();
cmdDevice = new AsaCommand("DROP CONNECTION " + strConnNum, conn);
cmdDevice.ExecuteNonQuery();
/////////////////////

//////////////////// This should work even from the current connection!
cmdDevice = new AsaCommand("STOP ENGINE UNCONDITIONALLY", conn);
cmdDevice.ExecuteNonQuery();
////////////////////

/////////////////// This should work but from a different DB connection!
cmdDevice = new AsaCommand("STOP DATABASE DBDemo UNCONDITIONALLY", conn);
cmdDevice.ExecuteNonQuery();
///////////////////

"Breck Carter [TeamSybase]" <NOSPAM__bcarter (AT) risingroad (DOT) com> wrote in
message newsnh1tv8g7gudn91ln3tlmtl7uua3cpr5cg (AT) 4ax (DOT) com...
When you say "doesn't work", what is the symptom? Please show us the
exact code you are using, and the exact error messages or other
symptoms you are getting.

Closing all the connections should cause the engine to stop if the
engine was started with AutoStop set to Yes.

AFAIK this stuff all works as advertised.

Breck

On 5 Dec 2003 08:36:26 -0800, "Katie" <j__i__m1 (AT) hotmail (DOT) com> wrote:

I'm trying to disconnect from my running database on a pocket pc using
the
various methods below. Nothing I tried has worked although the
documentation
says it should. Is there a known BUG or BUGS with this database server
on

pocket pc devices? I can't believe something so simple is such a
problem.
Makes me think Sybase anywhere isn't as good as they say it is. I tried
the
following methods...



Closing all my ADO.NET connections (doesn't work)

STOP DATABASE UNCONDITIONALLY (doesn't work)

STOP ENGINE UNCONDITIONALLY (doesn't work)

DROP CONNECTION connectionNumber (doesn't work)



Does anyone know how i cam stop the database or server or drop all
connections so I can copy and move the database file from my program
code?



Thanks!



VERY VERY FRUSTRATED WITH SYBASE!!!




--
bcarter (AT) risingroad (DOT) com
Mobile and Distributed Enterprise Database Applications
www.risingroad.com





Reply With Quote
  #5  
Old   
Katie
 
Posts: n/a

Default Re: how to stop bd, server or drop connections on pocket pc? - 12-05-2003 , 01:45 PM



also...

i get the start stop errors before any of my file copy code is run.

"Katie" <j__i__m1 (AT) hotmail (DOT) com> wrote

Quote:
correction... I'm not moving the file i'm just trying to create a copy. i
do know that it is read only....

"Katie" <j__i__m1 (AT) hotmail (DOT) com> wrote in message
news:3fd0d3bb$1 (AT) forums-1-dub (DOT) ..
I get various errors but mostly i get Cant Start/Stop database...

i tried disconnection from my ADO.NET connection using the test code
below.
I get an IOException when i try to move the file. because the db hasn't
stopped.

conn = new AsaConnection("DBF=\\Program
Files\\Demo\\DBDemo.db;UID=DBA;PWD=SQL;AutoStop=YE S;start=\\Program
Files\\Sybase\\ASA\\dbsrv9.exe -q" );
conn.Open();

...

conn.Close();
Thread.Sleep(4000);
//code to move file
...

I also tried these methods...
//////////////////////
cmdDevice = new AsaCommand("SELECT connection_property( 'number' )",
conn);
AsaDataReader reader = cmdDevice.ExecuteReader();
if (reader.Read())
{
strConnNum = reader.GetString( 0 );
}
reader.Close();
cmdDevice = new AsaCommand("DROP CONNECTION " + strConnNum, conn);
cmdDevice.ExecuteNonQuery();
/////////////////////

//////////////////// This should work even from the current connection!
cmdDevice = new AsaCommand("STOP ENGINE UNCONDITIONALLY", conn);
cmdDevice.ExecuteNonQuery();
////////////////////

/////////////////// This should work but from a different DB
connection!
cmdDevice = new AsaCommand("STOP DATABASE DBDemo UNCONDITIONALLY",
conn);
cmdDevice.ExecuteNonQuery();
///////////////////

"Breck Carter [TeamSybase]" <NOSPAM__bcarter (AT) risingroad (DOT) com> wrote in
message newsnh1tv8g7gudn91ln3tlmtl7uua3cpr5cg (AT) 4ax (DOT) com...
When you say "doesn't work", what is the symptom? Please show us the
exact code you are using, and the exact error messages or other
symptoms you are getting.

Closing all the connections should cause the engine to stop if the
engine was started with AutoStop set to Yes.

AFAIK this stuff all works as advertised.

Breck

On 5 Dec 2003 08:36:26 -0800, "Katie" <j__i__m1 (AT) hotmail (DOT) com> wrote:

I'm trying to disconnect from my running database on a pocket pc
using
the
various methods below. Nothing I tried has worked although the
documentation
says it should. Is there a known BUG or BUGS with this database
server
on

pocket pc devices? I can't believe something so simple is such a
problem.
Makes me think Sybase anywhere isn't as good as they say it is. I
tried
the
following methods...



Closing all my ADO.NET connections (doesn't work)

STOP DATABASE UNCONDITIONALLY (doesn't work)

STOP ENGINE UNCONDITIONALLY (doesn't work)

DROP CONNECTION connectionNumber (doesn't work)



Does anyone know how i cam stop the database or server or drop all
connections so I can copy and move the database file from my program
code?



Thanks!



VERY VERY FRUSTRATED WITH SYBASE!!!




--
bcarter (AT) risingroad (DOT) com
Mobile and Distributed Enterprise Database Applications
www.risingroad.com







Reply With Quote
  #6  
Old   
Alex Reif
 
Posts: n/a

Default Re: how to stop bd, server or drop connections on pocket pc? - 12-05-2003 , 02:01 PM



Connection pooling is turned on by default when using the ADO.NET data
provider. Adding POOLING=FALSE to your connect string will disable
connection pooling and your engine should shut down when all your
connections are closed.

- Alex.

"Katie" <j__i__m1 (AT) hotmail (DOT) com> wrote

Quote:
I get various errors but mostly i get Cant Start/Stop database...

i tried disconnection from my ADO.NET connection using the test code
below.
I get an IOException when i try to move the file. because the db hasn't
stopped.

conn = new AsaConnection("DBF=\\Program
Files\\Demo\\DBDemo.db;UID=DBA;PWD=SQL;AutoStop=YE S;start=\\Program
Files\\Sybase\\ASA\\dbsrv9.exe -q" );
conn.Open();

...

conn.Close();
Thread.Sleep(4000);
//code to move file
...

I also tried these methods...
//////////////////////
cmdDevice = new AsaCommand("SELECT connection_property( 'number' )",
conn);
AsaDataReader reader = cmdDevice.ExecuteReader();
if (reader.Read())
{
strConnNum = reader.GetString( 0 );
}
reader.Close();
cmdDevice = new AsaCommand("DROP CONNECTION " + strConnNum, conn);
cmdDevice.ExecuteNonQuery();
/////////////////////

//////////////////// This should work even from the current connection!
cmdDevice = new AsaCommand("STOP ENGINE UNCONDITIONALLY", conn);
cmdDevice.ExecuteNonQuery();
////////////////////

/////////////////// This should work but from a different DB connection!
cmdDevice = new AsaCommand("STOP DATABASE DBDemo UNCONDITIONALLY", conn);
cmdDevice.ExecuteNonQuery();
///////////////////

"Breck Carter [TeamSybase]" <NOSPAM__bcarter (AT) risingroad (DOT) com> wrote in
message newsnh1tv8g7gudn91ln3tlmtl7uua3cpr5cg (AT) 4ax (DOT) com...
When you say "doesn't work", what is the symptom? Please show us the
exact code you are using, and the exact error messages or other
symptoms you are getting.

Closing all the connections should cause the engine to stop if the
engine was started with AutoStop set to Yes.

AFAIK this stuff all works as advertised.

Breck

On 5 Dec 2003 08:36:26 -0800, "Katie" <j__i__m1 (AT) hotmail (DOT) com> wrote:

I'm trying to disconnect from my running database on a pocket pc using
the
various methods below. Nothing I tried has worked although the
documentation
says it should. Is there a known BUG or BUGS with this database server
on

pocket pc devices? I can't believe something so simple is such a
problem.
Makes me think Sybase anywhere isn't as good as they say it is. I tried
the
following methods...



Closing all my ADO.NET connections (doesn't work)

STOP DATABASE UNCONDITIONALLY (doesn't work)

STOP ENGINE UNCONDITIONALLY (doesn't work)

DROP CONNECTION connectionNumber (doesn't work)



Does anyone know how i cam stop the database or server or drop all
connections so I can copy and move the database file from my program
code?



Thanks!



VERY VERY FRUSTRATED WITH SYBASE!!!




--
bcarter (AT) risingroad (DOT) com
Mobile and Distributed Enterprise Database Applications
www.risingroad.com





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.