Hi,
I am developing an application for a Pocket PC (PPC). I am using Visual studio 2005, and the Operating system on this PPC is Window Mobile 2003 SE. The followings are my codes to connect PPC with the database on my PC with sql server 2005. But when I cick the button1, the error with "SQL Server does not exist or access denied." Any ideas Thanks a lot.
Imports
System.IOImports
System.DataImports
System.Data.SqlClientImports
System.MathImports
System.DrawingImports
System
Public
Class Form1 Dim strConnection As String = "Server=localhost;Integrated Security=SSPI;database=AdventureWorks" Dim strQuery As StringPrivate
Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.ClickLabel1.Text =
"Hello, Clicking after." ReadOrderData()End
Sub
Private
Sub ReadOrderData() Dim queryString As String = "select * from Person.Address where AddressID < '10'" Using connection As New SqlConnection(strConnection) Dim command As New SqlCommand(queryString, connection)connection.Open()
Dim reader As SqlDataReader = command.ExecuteReader() While reader.Read()MsgBox(
String.Format("{0}, {1}", _reader(0), reader(1)))
End Whilereader.Close()
End Using End SubEnd Class

Pocket PC database connection
obiron
you should check this link http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=709129&SiteID=1&mode=1
It works for me after a loooooonggg time testing
ShikhaVaid
vxUtil should be ultimately installed on device. However, like pretty much all Pocket PC products, it goes through desktop and Active Sync. You install/unzip application on to desktop, then you (or desktop installer) execute something which would push it to device via AS. As a developer you would have to do the same for your application eventually. In some cases there's no desktop installer, just a device CAB file. In that case simply copy CAB to device and click on it from device's file explorer.
Omer Colakoglu
Default SQL Server port is 1433 which is not opened so it's not going to work until your SQL Server is properly configured. Also you have to provide credential in connection string, this string is not going to work.
I'm moving this thread to appropriate forum.Allen LeRoy
Hi,
Thanks for your answer, and right now 1433 port is open. I would like to use windows authentication protocol. Could you please provide a sample for the connection string Thanks a lot.
qnal
so..It must have a password is it same with windows user's password what if blank
if I'm not wrong, if we set the windows password, we should change the SQL password too right
supi
Hi,
Thanks for your answer, and right now 1433 port is open. I would like to use windows authentication protocol. Could you please provide a sample for the connection string Thanks a lot.
Tomislav B.
Open the appropriate folder on the hard drive then double-click
on the InstallCE icon to start the install process for the correct device.
Polar Bear
Can someone please explain what is wrong here.
Unable to connect to or authenticate SQL Server Mobile Edition connection through Microsoft ActiveSync. Make sure your device is properly connected to this computer. (SQL Server Mobile Edition ADO.NET Data Provider)
this has been working ok for a couple of months and now its throwing this error up.
I've tried just about everything, reinstalling Management studio, formatting + flashing the PDA (PDA = Mobile 5 by the way).
I just cant get management studio to connect to a mobile database via Active Sync.
Also Visual Studio (2005) is also now throwing errors.
Please help, i'm stressed and dont have time to do another rebuild.
Thanks,
Lorenzo
slide
Hi I am working on the Connectivity of the PPC (pocket PC to the Mobile data base
plz guide me how can I do this
Thanking you
Mohammad Usman
BoseMK
Please see this:
http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=184007&SiteID=1
http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=235638&SiteID=1
If it still does not work after you fixed your 'localhost' issue:
http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=270532&SiteID=1
Also, we have forum dedicated to SQL Mobile. Please post to it should you have any SQL or SQL Mobile related questions:
http://forums.microsoft.com/MSDN/ShowForum.aspx ForumID=152&SiteID=1
Tony63
Dear Ilya Tumanov,
Your answer is so great. I have already installed it into the PPC, and it scanned the ports in my desktop PC. From the result, the ports 25, 80, 135, 139, 443, 445, 990 and1025 are all open. But the program that I posted yesterday and listed above can not still work. What do I need in the next step
Moreover, I have changed the connection string to
Dim strConnection As String = "Server=Server1;Integrated Security=SSPI;database=AdventureWorks"
Thanks a lot.
JIrwin
This should work:
"Server=YourServerHere,1433;Initial Catalog=YourDataBaseHere;User ID=YourLoginHere;Password=YourPasswordHere;Integrated Security=SSPI;"
Note you have to provide login and password even though windows authentication will be used. That's because there's no login procedure on devices.
grasi
Hi,
I am developing an application for a Pocket PC (PPC). I am using Visual studio 2005, and the Operating system on this PPC is Window Mobile 2003 SE. The followings are my codes to connect PPC with the database on my PC with sql server 2005. But when I cick the button1, the error with "SQL Server does not exist or access denied."
I have already installed vxUtil into the PPC, and Ping is OK. I use it to scan the ports in my desktop PC. From the result, the ports 25, 80, 135, 139, 443, 445, 990 and1025 are all open. But the program can not still work.
Any ideas Thanks a lot.
Imports
System.IOImports
System.DataImports
System.Data.SqlClientImports
System.MathImports
System.DrawingImports
SystemPublic
Class Form1 Dim strConnection As String = "Server=server1;Integrated Security=SSPI;database=AdventureWorks" Dim strQuery As StringPrivate
Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.ClickLabel1.Text =
"Hello, Clicking after." ReadOrderData()End
SubPrivate
Sub ReadOrderData() Dim queryString As String = "select * from Person.Address where AddressID < '10'" Using connection As New SqlConnection(strConnection) Dim command As New SqlCommand(queryString, connection)connection.Open()
Dim reader As SqlDataReader = command.ExecuteReader() While reader.Read()MsgBox(
String.Format("{0}, {1}", _reader(0), reader(1)))
End Whilereader.Close()
End Using End SubEnd Class
K Praveen Kumar Reddy
Dear Ilya Tumanov,
Thanks a lot for your so many helps, and it works.