![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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!!! |
#3
| |||
| |||
|
|
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 |
#4
| |||
| |||
|
|
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 news nh1tv8g7gudn91ln3tlmtl7uua3cpr5cg (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 |
#5
| |||
| |||
|
|
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 news nh1tv8g7gudn91ln3tlmtl7uua3cpr5cg (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 |
#6
| |||
| |||
|
|
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 news nh1tv8g7gudn91ln3tlmtl7uua3cpr5cg (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 |
![]() |
| Thread Tools | |
| Display Modes | |
| |