connecting data with MS Active Sync, howto?

is there any way to connect a database (desktop) from PPC2003 to a desktop with Active Sync 4.1 I can't do it with this code:

imports system.data.sqlclient

Public Function GetConnectionString()

Dim connectionstring As String = "Data Source=desktop;Initial Catalog=table-name;Integrated Security=True"

Return connectionstring

End Function

Private Sub click()

Dim connection As New SqlConnection(GetConnectionString)

connection.Open()

Dim queryString As String = _

"SELECT Layer FROM dbo.MasterLayer"

Dim adapter As SqlDataAdapter = New SqlDataAdapter( _

queryString, connection)

Dim mstmap As New dataset

Dim mst As DataRow

end sub

also I got an error that dataset & datarow is not defined

please help, thx b4




Answer this question

connecting data with MS Active Sync, howto?

  • greenhorn

    Try using IP address of your desktop computer in the connection string

  • weaasd

    And what about the device is it SQL ready I mean..do I have to install some software (SDK, Framework, etc) to retrieve data from database or just .NET CF 2.0 that came along with the deployment an Ad-Hoc connection between PC - device will work, right



  • DevilDog74

    a little info from cambridge

    "ActiveSync on Pocket PC 2003 uses a sub-set of TCPIP and therefore does not support ping. It's an ActiveSync issue. Windows Mobile 5.0 does work."

    is it right



  • David_Taylor_SOE

    Just NetCF 2.0 will suffice.
  • amiable

    Yes, you can. You need:

    1. Fix compilation errors by adding required references and "Imports" statements.

    2. Fix your connection string:

    http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=333231&SiteID=1

    3. Make sure SQL Server is configured properly and is accessible from device:

    http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=270532&SiteID=1



  • Will Merydith

    please still need help

    untill now I can't connect my device to SQL Server 2005 on my PC, my SQLServer using Windows Auth

    I've tried this one and it didn't work :

    connstr="Data Source=192.168.0.1;Initial Catalog=xxxx;Integrated Security=True"

    Using VxUtils to scan port, but still didn't work (port 1433 open)

    connstr="Data Source=192.168.0.1,1433;Initial Catalog=xxxx;Integrated Security=True"

    Is it true that we have to include Username and Password into connstr



  • Mikael Olesen

    Yes, you can't ping but you can do port scan. That is light years away though, as you could not even compile yet.

    Unfortunately there’s nothing we can do for you (short of actually doing it) since ability to correct syntax errors is so basic and required skill for any developer.

    Actually there’s something I can do:

    http://www.amazon.com/s/ref=nb_ss_b/104-7363670-6713522 url=search-alias%3Dstripbooks&field-keywords=Compact+Framework&Go.x=10&Go.y=7



  • Chiarigos

    What about connecting from a WiFI are we still using the port number to make a connection

    do you guys have the experience connecting PPC2003 to PC SQLServer 2005 using WiFI please tell me what kind of device do you have

    please..I'm way behind the schedule



  • Pintoo Khaira

    can you tell me how to write connectionstring that using a port is it like below with 4000 is a port number

    connstr="Data Source=192.168.0.1,4000;Initial Catalog=GIS;Integrated Security=True"

    thanks



  • Hossam Abdel Wahab

  • Arjun B

    still having problem with dataset&datarow, anybody care I dont know the right syntax

    thx b4



  • deKay

    Yes, it's all the same TCP/IP. SQL Client don't care if you using Wi-Fi or AS pass-through or wired Ethernet or even 56K modem, it works the same way. The only required thing is what packets should be able to travel for PPC to PC and back, which you can verify with vxUtils.



  • douroth

    thanks for your reply though

  • connecting data with MS Active Sync, howto?