|
-
Oct 27th, 2005, 02:43 PM
#1
Thread Starter
New Member
Problem In PULL method...
hi frnds,
iam trying to get data from sql server to sql server ce.....but it is generating error......
plz refer my code and suggest some changes.......my code follows
If File.Exists("\Temp\naren.sdf") Then
File.Delete("\Temp\naren.sdf")
End If
Dim objsqlengine As New SqlCeEngine("Data Source=\Temp\naren.sdf")
objsqlengine.CreateDatabase()
Dim rdaOleDbConnectString As String = "Initial Catalog=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=MobileData;Packet Size=4096;Workstation ID=SOFT;"
Dim rda As New SqlCeRemoteDataAccess
rda.InternetUrl = "http://localhost/SQLCE/Sscesa20.dll"
rda.LocalConnectionString = "Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0;Data Source=\Temp\naren.sdf"
rda.Pull("student", "Select * from student", rdaOleDbConnectString, RdaBatchOption.BatchingOn)
MsgBox("Pull operation completed", MsgBoxStyle.Information, "Pull")
-
Oct 28th, 2005, 06:48 AM
#2
Fanatic Member
Re: Problem In PULL method...
what is the error????? There are many different errors that can occur during RDA!!!!
did you have a look at this post http://www.vbforums.com/showthread.php?t=364268
Barry
Visual Studio .NET 2008/Visual Studio .NET 2005/Visual Studio .NET 2003
.NET Framework 3.0 2.0 1.1/ASP.Net 3.0 2.0 1.1/Compact Framework 1.0
SQL Server 2005/2000/SQL Server CE 2.0
If you like, rate this post
Compact Framework for Beginners
-
Oct 28th, 2005, 11:43 AM
#3
Thread Starter
New Member
Re: Problem In PULL method...
hai strider,
My Error is Follows
An unhandled exception of type 'System.Data.SqlServerCe.SqlCeException' occurred in System.Data.SqlServerCe.dll
Additional information: SqlCeException
-
Oct 28th, 2005, 12:28 PM
#4
Fanatic Member
Re: Problem In PULL method...
add a try catch around the code
try
catch ex As sqlceexception
msgbox ex.message
end try
is sqlce installed on the handheld?
Barry
Visual Studio .NET 2008/Visual Studio .NET 2005/Visual Studio .NET 2003
.NET Framework 3.0 2.0 1.1/ASP.Net 3.0 2.0 1.1/Compact Framework 1.0
SQL Server 2005/2000/SQL Server CE 2.0
If you like, rate this post
Compact Framework for Beginners
-
Oct 30th, 2005, 01:34 AM
#5
Thread Starter
New Member
Re: Problem In PULL method...
i tried by putting try block....but is of no use....same eror coming...
here iam listing code below
If File.Exists("\Temp\naren.sdf") Then
File.Delete("\Temp\naren.sdf")
End If
Try
Dim objsqlengine As New SqlCeEngine("Data Source=\Temp\naren.sdf")
objsqlengine.CreateDatabase()
Dim rdaOleDbConnectString As String = "Initial Catalog=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=MobileData;Packet Size=4096;Workstation ID=SOFT;"
'Dim rdaOleDbConnectString As String = "Provider=sqloledb;DataSource=SOFT;InitialCatalog=MobileData;UserId=sa;Password ="
Dim rda As New SqlCeRemoteDataAccess
rda.InternetUrl = "http://localhost/SQLCE/Sscesa20.dll"
rda.LocalConnectionString = "Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0;Data Source=\Temp\naren.sdf"
rda.Pull("student", "Select * from student", rdaOleDbConnectString, RdaBatchOption.BatchingOn)
MsgBox("Pull operation completed", MsgBoxStyle.Information, "Pull")
Catch ex As Exception
MsgBox(ex.Message.ToString)
End Try
-
Oct 30th, 2005, 02:24 AM
#6
Frenzied Member
Re: Problem In PULL method...
Hi,
single step through, and see where it hits an error
Pete
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|