Pocket pc + Connexion à une base de données

cs_emmanuel9 Messages postés 903 Date d'inscription mercredi 23 février 2005 Statut Membre Dernière intervention 16 juin 2010 - 14 juin 2006 à 14:10
cs_Stephane33 Messages postés 630 Date d'inscription samedi 15 février 2003 Statut Modérateur Dernière intervention 9 octobre 2011 - 14 juil. 2006 à 11:41
Bonjour à tous,

Je dois réaliser en c# une application smart device pocket pc 2003 et j'aurais besoin de me connecter à partir du pda sur une base de données sql server. Quelqun serait t'il comment réaliser cela ? Au moment où un hotsync est effectué ?

Voila si qq avait une idée sur la question... Par avance, merci.

1 réponse

cs_Stephane33 Messages postés 630 Date d'inscription samedi 15 février 2003 Statut Modérateur Dernière intervention 9 octobre 2011 1
14 juil. 2006 à 11:41
'Exemple permettant de récupérer des données du PC vers le Pocket via RDA
<!-- BEGIN TEMPLATE: bbcode_code -->

Code :

Public Sub Synchronise(ByVal NomTable As String, ByVal ChaineSQL As String, ByVal OptionSuivi As RdaTrackOption)
' Connection String to the SQL Server.
Dim rdaOleDbConnectString As String = _
"Provider=sqloledb; Data Source=BARTON\MSDE;Initial Catalog=ValTrace; " + _
"User Id=sa; Password = admin"

' Initialize RDA Object.
Dim rda As SqlCeRemoteDataAccess = Nothing

Try
'Try the Pull Operation.
rda = New SqlCeRemoteDataAccess

rda.InternetLogin = ""
rda.InternetPassword = ""
rda.InternetUrl = "http://192.168.0.101/sqlce/sscesa20.dll"
rda.LocalConnectionString = "Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0;Data Source=\My documents\Datas\valpocket.sdf"
rda.Pull(NomTable, ChaineSQL, rdaOleDbConnectString, OptionSuivi)

Catch e As SqlCeException
'Use you own Error Handling Routine.
MessageBox.Show(e.Message)
Finally
'Dispose of the RDA Object.
rda.Dispose()
End Try

End Sub
0
Rejoignez-nous