SQL Compact edition 2005 (Full Version)

All Forums >> [.NET Compact Framework Development] >> .NET Compact Framework - VB.NET



Message


gilkaths -> SQL Compact edition 2005 (4/3/2008 10:41:28 PM)

Hello,

I'm having a problem when connecting to my sdf database using sqlserverce. Myconnection string is "Data Source = \my.sdf;Password=testing;Persist Security Info=False;". When I execute the cnce.open, it catches an exception but it doesn't display any error description.  I'm running the application in Windows CE 5.0.  Please help.




petevick -> RE: SQL Compact edition 2005 (4/4/2008 3:39:31 AM)

Hi,
I just use 'Data Source=' and don't use 'Persist security' etc

Try that

Pete




gilkaths -> RE: SQL Compact edition 2005 (4/4/2008 7:34:38 AM)

Hello Pete,

Here is my code

           Using cnce As New SqlCeConnection(PDAConstr)
               cnce.Open()
               cmce = cnce.CreateCommand
               cmce.CommandText = "SELECT * FROM USERS WHERE US_USERID='" & txtCode.Text.Trim & "'"
               Using rs As SqlCeDataReader = cmce.ExecuteReader
                   If rs.Read Then
                       goGo = True
                   End If
               End Using
           End Using

the error occurs in the part of cnce.open.  The exception have no description.  What is the problem?




petevick -> RE: SQL Compact edition 2005 (4/4/2008 11:47:20 AM)

Have you tried the connection string i suggested?
"Data source=\my.sdf;password=testing;"
?




gilkaths -> RE: SQL Compact edition 2005 (4/4/2008 10:03:39 PM)

Hello Pete,

Yes, i already tried your suggestion.  In fact, it already worked in Windows Mobile 5 based PDA, but when i tried it in Windows CE 5.0, it generates error without any error description. 




gilkaths -> RE: SQL Compact edition 2005 (4/15/2008 5:23:43 AM)

Hello Pete,

Do i need to check my version of Compact Edition.  I tried opening the sdf file in the sqlclient inside WinCE5.0 and it open successfully.  Any suggestions?  It still won't work.  Please help.




petevick -> RE: SQL Compact edition 2005 (4/15/2008 9:05:59 AM)

Does the Query Analyzer tool work in your version of Windows CE?

I don't understand
quote:

"I tried opening the sdf file in the sqlclient inside WinCE5.0 and it open successfully"




gilkaths -> RE: SQL Compact edition 2005 (4/15/2008 9:27:11 PM)

Hello Pete,

Sorry, I'll rephrase my sentence. I mean, the sdf file works in the Query Analyzer in the device.  What can be the problem?




petevick -> RE: SQL Compact edition 2005 (4/16/2008 8:35:37 AM)

Hi,
all I can think is that you may have 2 versions on your device.

I am surprised that it catches an exception, yet doesn't show an error message.

What happens if you step through, and display 'ex' (if that is your exception), err.number and err.description?
Pete




gilkaths -> RE: SQL Compact edition 2005 (5/2/2008 9:28:28 PM)

Hello,

When I displayed the err.number and err.description. It doesn't display anything. Do I need to create the sdf file through code?




gilkaths -> RE: SQL Compact edition 2005 (5/5/2008 7:31:36 AM)

Hello Pete,

Maybe i installed the wrong cab files.  Which cab file must i used to install the SQL Server 2005 Compact edition in Windows CE 5.0?  Please help.




petevick -> RE: SQL Compact edition 2005 (5/6/2008 4:17:42 AM)

I install
sqlce30.wce5.armv4i.CAB
from
C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\SQL Server\Mobile\v3.0\wce500\armv4i

Pete




gilkaths -> RE: SQL Compact edition 2005 (6/16/2008 7:01:53 AM)

Hello Pete,

Thank you for the reply. The problem was cause by the Low memory of the PDA.




Page: [1]



Forum Software © ASPPlayground.NET Advanced Edition 2.5.5 Unicode

0.000