Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Conneting SQL Server 2000

3 views
Skip to first unread message

Andreas Kutta

unread,
Aug 23, 2002, 3:06:40 AM8/23/02
to
Hi!

I have a big problem.
I want to connet a SQL Server 2000 Database from a PDA, with
Compactframework.
BUT I get a "SQLExeption" , by opening a connection to the database,
which isn´t explaint anywhere.

My sourcecode:
-------------------------------------------------------------------------------
Dim myConnectionString As String
Dim cn As System.Data.SqlClient.SqlConnection

myConnectionString = "Initial Catalog=mytable;Data
Source='mydatabase';user ID=myuser;password=mypassword;"

Try
cn = New System.Data.SqlClient.SqlConnection(myConnectionString)
cn.Open()
Catch ex As Exception
MsgBox(ex.Message)
End Try
-------------------------------------------------------------------------------

I test the sourcecode with a wired and wireless network connection.
The same connetionstring open the connection at the Desktopframework.

Can anyone help me?

Thank you

Andreas Kutta

John Carter

unread,
Aug 23, 2002, 3:29:32 PM8/23/02
to
> myConnectionString = "Initial Catalog=mytable;Data
> Source='mydatabase';user ID=myuser;password=mypassword;"
the value for Initial Catalog and Data Source are not correct.

try this :
myConnectionString = "Initial Catalog = myDatabase; Data Source=mySqlServer;
user id = myUserID; password = myPassword"

Best wishes.

Yunwen
yb...@microsoft.com
Sql Server CE

This posting is provided "AS IS" with no warranties, and confers no rights.

"Andreas Kutta" <aku...@rensch.de> wrote in message
news:d5578328.0208...@posting.google.com...

Tim Wilson

unread,
Aug 23, 2002, 5:52:39 PM8/23/02
to
Try using System.Data.SqlServerCe.SqlCeConnection instead of
System.Data.SqlClient.SqlConnection.

--
====================================
Tim Wilson
Mobile Software Solutions Inc.
====================================


"Andreas Kutta" <aku...@rensch.de> wrote in message
news:d5578328.0208...@posting.google.com...

Andreas Kutta

unread,
Aug 26, 2002, 3:19:29 AM8/26/02
to
Hi!

I have try this, but i become the same error Message "SQLExeption".
Any other idea?

Thank you

Andreas Kutta

"John Carter" <johnC...@hotmail.com> wrote in message news:<3d668d1d$1...@news.microsoft.com>...

Andreas Kutta

unread,
Aug 26, 2002, 3:21:44 AM8/26/02
to
Hi Tim!

I try using your sourcecode, but I become the error message
"Could not find resource assembly"
Any other idea?

Thank you

Andreas Kutta

"Tim Wilson" <TWi...@CadreGroup.ca> wrote in message news:<#UJJi8uSCHA.1340@tkmsftngp12>...

Tim Wilson

unread,
Aug 26, 2002, 11:49:17 AM8/26/02
to
Try adding a reference to System.Data.SqlServerCe by right clicking on
"References" in the Solution Explorer and adding the mentioned reference.
Tim

--
====================================
Tim Wilson
Mobile Software Solutions Inc.
====================================
"Andreas Kutta" <aku...@rensch.de> wrote in message

news:d5578328.02082...@posting.google.com...

Andreas Kutta

unread,
Aug 27, 2002, 2:49:27 AM8/27/02
to
Hello,

I used this references:

- System.Data.SqlServerCe
- System.Data.SqlClient
- System.Data
...

But i get the same Error Message...

Andreas Kutta

"Tim Wilson" <TWi...@CadreGroup.ca> wrote in message news:<#USGcfRTCHA.1652@tkmsftngp09>...

Tim Wilson

unread,
Aug 27, 2002, 9:08:28 AM8/27/02
to
Typically "Could not find resource assembly" (at compile time) means that
you have not included an assembly that is needed by the compiler. Do you get
proper intellisense help when you are coding your connection?
I re-read your original post and it says "I want to connet a SQL Server 2000
Database from a PDA". Are you trying to connect to a Server running SQL
Serer from your PDA? As far as I know you cannot make a direct connection
from a PDA to SQL Server. You will have to use Web Services to retrieve the
data or use a SQL Server CE database on your PDA and then use RDA to get the
data from a SQL Server database to the SQL Server CE database.
Tim

--
====================================
Tim Wilson
Mobile Software Solutions Inc.
====================================
"Andreas Kutta" <aku...@rensch.de> wrote in message

news:d5578328.0208...@posting.google.com...

Larry Roof

unread,
Aug 27, 2002, 5:17:04 PM8/27/02
to
My latest article for MSDN Voices "Two for the Road" demonstrates connecting
from the device directly to a SQL Server database. The article is available
online at:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnroad/html
/road08272002.asp

"Andreas Kutta" <aku...@rensch.de> wrote in message
news:d5578328.0208...@posting.google.com...

Andreas Kutta

unread,
Aug 28, 2002, 4:03:20 AM8/28/02
to
Hi Larry!

I have read this article for a week
and tested the exapmle, which you can
download at this site, but it didn´t work.
Any other ideas?

Thank you

Andreas Kutta

Andreas Kutta

unread,
Aug 28, 2002, 4:28:10 AM8/28/02
to
Hi Tim!

I hear from RDA, but I can´t find examples for VB.NET programs,
only for eVB.
Have you some example for RDA for me?

Alternative I tested to send Data over a webservice.
Only one BIG problem:
I can only send Data up to 500 kb to the PDA.
But up 500-1000 kb Data I get the error message "Out of Memory".
Then I set the memory in the PDA-Emulator up to 256 MB, but I get
the same error message.
Any idea to solve this problem?

Thank you

Andreas Kutta

"Tim Wilson" <TWi...@CadreGroup.ca> wrote in message news:<##L#NqcTCHA.3620@tkmsftngp08>...

Tim Wilson

unread,
Aug 28, 2002, 11:13:44 AM8/28/02
to
If you do a search in this NewsGroup you should be able to get more info on
RDA.
I do not know the memory limitations of DataSets in the Compact Framework. A
solution I would try is to get the data down in more manageable chunks -
send less data, and make more calls, and then piece your dataset back
together. Post a new thread and ask anybody if they have run into memory
limitations in the emulator specifically retrieving large DataSets from a
Web Service.

Tim
--
====================================
Tim Wilson
Mobile Software Solutions Inc.
====================================
"Andreas Kutta" <aku...@rensch.de> wrote in message
news:d5578328.02082...@posting.google.com...

Larry Roof

unread,
Aug 28, 2002, 5:35:27 PM8/28/02
to
The first thing I would suggest is to double-check the setup instructions on
SQL Server CE. There is information in the documentation on this topic.
Everything has to be set up correctly on the server.

"Andreas Kutta" <aku...@rensch.de> wrote in message

news:d5578328.02082...@posting.google.com...

0 new messages