If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Microsoft SQL Server > MSSQServer 2000 for pocket pc

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-12-04, 06:36
simona simona is offline
Registered User
 
Join Date: Jan 2004
Posts: 5
MSSQServer 2000 for pocket pc

Hi to all.
I have a windows ce mssqlserver 2000 version.
I have writted a java application and i needed a database connection.
I wish a driver for execute the connection to mssql server 2000 into pocket pc.

The connection string that i use is

connessione = DriverManager.getConnection("jdbc:microsoft:sqlser ver://localhost:1433;databasename=A&MMobile", "sa", "sa");

Ok?

Which are the driver that i needed?

Thanx,

Simona
Reply With Quote
  #2 (permalink)  
Old 01-12-04, 07:34
guiguix guiguix is offline
Registered User
 
Join Date: Mar 2003
Location: PARIS
Posts: 5
Re: MSSQServer 2000 for pocket pc

Quote:
Originally posted by simona
Hi to all.
I have a windows ce mssqlserver 2000 version.
I have writted a java application and i needed a database connection.
I wish a driver for execute the connection to mssql server 2000 into pocket pc.

The connection string that i use is

connessione = DriverManager.getConnection("jdbc:microsoft:sqlser ver://localhost:1433;databasename=A&MMobile", "sa", "sa");

Ok?

Which are the driver that i needed?

Thanx,

Simona


Sorry but i'cant help you.

But i'm interrested for your java application.

which is the JVM which you use ?
Could you give me a java for ppc sample code 'HELLO WORLD!' ?

thank you,

Guiguix.
Reply With Quote
  #3 (permalink)  
Old 01-12-04, 08:54
simona simona is offline
Registered User
 
Join Date: Jan 2004
Posts: 5
Hi,
yhe java code is traditionally.

You write a "Hello world" java code and you copy it in the pocket pc.
The jvm is Creme. It support swing! But the needed java version is very old. I use the java 1.1.8 ;(

Bye
Reply With Quote
  #4 (permalink)  
Old 01-12-04, 10:13
gyuan gyuan is offline
Registered User
 
Join Date: Dec 2003
Posts: 454
There are two steps to establish a connection:

(1) loading the driver
If you want to use the JDBC-ODBC Bridge driver, the following code will load it.

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

(2) making the connection
If you are using the JDBC-ODBC Bridge driver, you can use

String url = "jdbc: odbc:ODBC_DataSourceName";
Connection con = DriverManager.getConnection(url, "myLogin", "myPassword");

Note that there is no space between jdbc: and odbc in url. If I remove it a sign will be shown in the code.

Last edited by gyuan; 01-12-04 at 10:18.
Reply With Quote
  #5 (permalink)  
Old 01-12-04, 11:05
simona simona is offline
Registered User
 
Join Date: Jan 2004
Posts: 5
Talking

And is this ok for pocket pc?
Wow!
Reply With Quote
  #6 (permalink)  
Old 01-12-04, 11:40
gyuan gyuan is offline
Registered User
 
Join Date: Dec 2003
Posts: 454
When you say "pocket PC", it is a laptop, right? I didn't try the connection on SQL Server 2000 Windows CE Edition, but it works for the other versions of SQL Server 2000.
Reply With Quote
  #7 (permalink)  
Old 01-12-04, 11:52
simona simona is offline
Registered User
 
Join Date: Jan 2004
Posts: 5
Talking

Pocket pc is a palm. Not Palm OS, but pocket pc.
MSSqlServer 2000 works on pc desktop but not on pocket pc.
Moreover the strings

------------------------------------------------------------------------
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

String url = "jdbc: odbc://localhost:1433;databasename=AeMMobile";

connessione = DriverManager.getConnection(url, "sa", "sa");
----------------------------------------------------------------------------

don't work.

While with

-------------------------------------------------------------------------

Class.forName("com.microsoft.jdbc.sqlserver.SQLSer verDriver");

connessione = DriverManager.getConnection("jdbc:microsoft:sqlser ver://localhost:1433;databasename=AeMMobile", "sa", "sa");

-------------------------------------------------------------------

on pc desktop is ok.
My problem is on pocket pc?
Do you know the solution?
Reply With Quote
  #8 (permalink)  
Old 01-12-04, 12:08
gyuan gyuan is offline
Registered User
 
Join Date: Dec 2003
Posts: 454
I do not know what the pocket PC is. I have a question. Since the SQL server is on the desktop which should be a Windows server, is your pocket PC connected to that server?
Reply With Quote
  #9 (permalink)  
Old 01-12-04, 12:27
simona simona is offline
Registered User
 
Join Date: Jan 2004
Posts: 5
Smile

The pocket pc is an hp 2002.
If you means that pocket pc is connected with replication data.... yes.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On