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

connecting data with MS Active Sync, howto?
Jason Zhang
lebronJames23
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
TonyMan - MSFT
still having problem with dataset&datarow, anybody care I dont know the right syntax
thx b4
Can-Ann
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
jiao
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
Folyjon
Autofreak
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
Matt Morehead
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
EADM
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.
Linusguy
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
Jan Kučera
Yes. Please see this for details:
http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring.aspx
Flashouille
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
JeryH