Thursday, March 22, 2012

Can not connect to MSDE 2000 through my PDA application

Hi, I am new to MSDE and am having a problem connecting to it through my PDA
application. Everytime i try to open the connection i get a exception of
PlatformNotSupportedException.
I have checked this problem for many times and fail to find an ideal
solution. My question is whether it was caused by an low version of MSDE? I
have tried to update the MSDE with SP4, but it failed. The error message is
:The instance name specified is invalid.
Anyone can help me ? Thanks!
hi,
phil wrote:
> Hi, I am new to MSDE and am having a problem connecting to it through
> my PDA application. Everytime i try to open the connection i get a
> exception of PlatformNotSupportedException.
> I have checked this problem for many times and fail to find an ideal
> solution. My question is whether it was caused by an low version of
> MSDE? I have tried to update the MSDE with SP4, but it failed. The
> error message is
> Anyone can help me ? Thanks!
I recently wote a little 300k PocketPC app using Vb.Net and the Compact
Framework for our inhouse order entry management... it is a connected app,
as it works connected via wi-fi with the main SQL Server engine... and it
works great :D
I think you've better ask in the specific compiler/language ng for better
luck...
as regard the MSDE upgrade to sp4, I've found that the instance name is
better understood by the setup.exe boostrap installer if provided without
quotes, in the form
c:\...\>setup.exe /upgradesp SQLRUN INSTANCENAME=whatever ..(other params)
/L*v "c:\MsdeSP4.txt"
but this is my own experience...
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.14.0 - DbaMgr ver 0.59.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||hi Andrea Montanari, thanks for ur reply. As to the installation of SP4, i
have solved the problem with ur great suggestion. Thanks again.
But i still sufferd the problem with my pda app to connect with a MSDE
DATABSE. When I'd like to use SqlConnection.Open() in a Pocket PC 2002
application, I get an error message - PlatformNotSupportedException. I've
tryed it on Windows CE Emulator and my PDA Device, but the result was the
same.
There is my code snippet:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim cn As New System.Data.SqlClient.SqlConnection("User
ID=sa;password=sa;database=Test;server=192.168.1.5 ")
cn.Open()
Catch exSQL As SqlException
Dim errSQL As SqlError
For Each errSQL In exSQL.Errors
MessageBox.Show(errSQL.Message)
Next
Catch ex1 As Exception
MessageBox.Show(ex1.Message)
Finally
MessageBox.Show("test fail")
End Sub
When i try to build a windows application project with this code, it works
well, Can anybody give me a tip, how can i solve the problem?
Thank's in advance.
Operating system: Windows XP professional + sp2
Development Tool: Visual Studion 2003
Database: MSDE 2000 Release A
PDA device: iPaq H3870, Windows CE 4.1
|||hi,
phil wrote:
> hi Andrea Montanari, thanks for ur reply. As to the installation of
> SP4, i have solved the problem with ur great suggestion. Thanks again.


> But i still sufferd the problem with my pda app to connect with a MSDE
> DATABSE. When I'd like to use SqlConnection.Open() in a Pocket PC 2002
> application, I get an error message - PlatformNotSupportedException.
> I've tryed it on Windows CE Emulator and my PDA Device, but the
> result was the same.
>
> There is my code snippet:
> Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles Button1.Click
> Dim cn As New System.Data.SqlClient.SqlConnection("User
> ID=sa;password=sa;database=Test;server=192.168.1.5 ")
>
it seems fine, to me... but unfortunately have no further hints.. try in the
DotNet compact framework ngs...
sorry..
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.14.0 - DbaMgr ver 0.59.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||You need to use the System.Data.SqlServerCe namespace and make sure you are
not referencing anything in then 1.1 framework. All references need to be
to the compact framework
http://msdn.microsoft.com/library/de...qlserverce.asp
In c#
SqlCeConnection conn = new SqlCeConnection( connString );
conn.Open();
"phil" <phil@.discussions.microsoft.com> wrote in message
news:02E40A6C-48C3-4DAD-9EDB-3F7B76CFA027@.microsoft.com...
> hi Andrea Montanari, thanks for ur reply. As to the installation of SP4, i
> have solved the problem with ur great suggestion. Thanks again.
> But i still sufferd the problem with my pda app to connect with a MSDE
> DATABSE. When I'd like to use SqlConnection.Open() in a Pocket PC 2002
> application, I get an error message - PlatformNotSupportedException. I've
> tryed it on Windows CE Emulator and my PDA Device, but the result was the
> same.
>
> There is my code snippet:
> Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles Button1.Click
> Dim cn As New System.Data.SqlClient.SqlConnection("User
> ID=sa;password=sa;database=Test;server=192.168.1.5 ")
> cn.Open()
> Catch exSQL As SqlException
> Dim errSQL As SqlError
> For Each errSQL In exSQL.Errors
> MessageBox.Show(errSQL.Message)
> Next
> Catch ex1 As Exception
> MessageBox.Show(ex1.Message)
> Finally
> MessageBox.Show("test fail")
> End Sub
> When i try to build a windows application project with this code, it
works
> well, Can anybody give me a tip, how can i solve the problem?
> Thank's in advance.
>
> Operating system: Windows XP professional + sp2
> Development Tool: Visual Studion 2003
> Database: MSDE 2000 Release A
> PDA device: iPaq H3870, Windows CE 4.1
>
|||hi Darren
Darren wrote:
> You need to use the System.Data.SqlServerCe namespace and make sure
> you are not referencing anything in then 1.1 framework. All
> references need to be to the compact framework
> http://msdn.microsoft.com/library/de...qlserverce.asp
> In c#
> SqlCeConnection conn = new SqlCeConnection( connString );
> conn.Open();
>
this is true for a SQLCe connection, but not for a connection to a
"standard" SQL Server/MSDE remote instance via wi-fi..
in this case, the System.Data.SqlClient reference is needed as already
indicated by Phil...
and the compact framework includes SqlClient component...
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.14.0 - DbaMgr ver 0.59.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||Thanks for the info.
I didn't realize that namespace was available in the CF.
"Andrea Montanari" <andrea.sqlDMO@.virgilio.it> wrote in message
news:3k2698Fs76uvU1@.individual.net...[vbcol=seagreen]
> hi Darren
> Darren wrote:
http://msdn.microsoft.com/library/de...qlserverce.asp
> this is true for a SQLCe connection, but not for a connection to a
> "standard" SQL Server/MSDE remote instance via wi-fi..
> in this case, the System.Data.SqlClient reference is needed as already
> indicated by Phil...
> and the compact framework includes SqlClient component...
> --
> Andrea Montanari (Microsoft MVP - SQL Server)
> http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
> DbaMgr2k ver 0.14.0 - DbaMgr ver 0.59.0
> (my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
> interface)
> -- remove DMO to reply
>

No comments:

Post a Comment