Accessing SQL Mobile Databases In VB2005 - Pocket PCApp
Mar 1, 2006
I am using VS 2005 to develop a Pocket PC 2003 application and for some reason I dont have the ability to assign my datasource to a SQL Mobile Database?
When opening Server Explorer, right clicking Data Connection, Add New Data Source, Change Data Source, the only options I get are
Microsoft Access Database File
Microsoft ODBC Data Source
Microsoft SQL Server
Microsoft SQL Server Database File
Oracle Database
<other>
I was trying to follow the tutorial
Step by Step: Developing a SQL Mobile Application with Visual Studio 2005
and SQL Server 2005 (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppcgen/html/med302_msdn_sql_mobile.asp)
and in that tutorial when they do the exact same thing it shows a screen shot that also lists 'Microsoft SQL Server Mobile Edition'
Any ideas why I dont have that option? FYI, I have SQL Server 2005 and have installed SQL Server 2005 Mobile Edition.
Thanks
Mike
View 5 Replies
ADVERTISEMENT
Dec 9, 2005
I have both used the Data Connection Wizard and tried programatically to
View 29 Replies
View Related
Apr 4, 2006
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.IO
Imports System.Data
Imports System.Data.SqlClient
Imports System.Math
Imports System.Drawing
Imports System
Public Class Form1
Dim strConnection As String = "Server=localhost;Integrated Security=SSPI;database=AdventureWorks"
Dim strQuery As String
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Label1.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 While
reader.Close()
End Using
End Sub
End Class
View 15 Replies
View Related
Feb 8, 2006
Hi,
I am developing a application where the database needs to be deployed from the central database server which is sql server 2005, and we have only few fields and few new tables which need to be deployed into pocket pc using sql mobile from sql server 2005. We would like to design the database in sql server 2005 for mobile, which will be only structure and will be deployed into PDA using web service.
Could anyone help on the above problem?
View 1 Replies
View Related
Jan 28, 2008
Hi All, this system is scheduled to go live in near to a day... but i have hit an issue when switching on SSL. Any help would be greatly appreciated.
Device Env:
Windows Mobile 5.0 + Messaging and Security Feature Pack
SQL Server Mobile 2005.
Merge replication works fine without SSL. After running the Configure Web Sync wizzard to setup SSL merge replication no longer works. Note i checked using pocket IE by browsing to https://mycompany.com/pub/sqlcesa30.dll?diag and all worked fine. There was no prompt saying the cert was bad etc.
The certificate is a:
Equifax secure global ebusiness CA-1 cert.
Signature algorithm md5RSA
public key RSA(1024 bits)
thumbprint algorithm sha1
Stacktrace given is:
- ex {"A request to send data to the computer running IIS has failed. For more information, see HRESULT."} System.Data.SqlServerCe.SqlCeException
- Errors {System.Data.SqlServerCe.SqlCeErrorCollection} System.Data.SqlServerCe.SqlCeErrorCollection
Count 1 Integer
Item In order to evaluate an indexed property, the property must be qualified and the arguments must be explicitly supplied by the user. System.Data.SqlServerCe.SqlCeError
HResult -2147012858 Integer
InnerException Nothing System.Exception
Message "A request to send data to the computer running IIS has failed. For more information, see HRESULT." String
NativeError 28037 Integer
Source "Microsoft SQL Server 2005 Mobile Edition" String
StackTrace "at System.Data.SqlServerCe.NativeMethods.CheckHRESULT()
at System.Data.SqlServerCe.SqlCeReplication.Synchronize()
at MyApp.Helper.Replication.SynchronizeInit()
at MyApp.CallSynchronize()
at System.Windows.Forms.Control.OnGotFocus()
at System.Windows.Forms.Control.WnProc()
at System.Windows.Forms.ContainerControl.WnProc()
at System.Windows.Forms.Form.WnProc()
at System.Windows.Forms.Control._InternalWnProc()
at Microsoft.AGL.Forms.EVL.EnterMainLoop()
at System.Windows.Forms.Application.Run()
at MyApp.Program.Main()
View 2 Replies
View Related
Feb 28, 2006
I am very new to programming using Pocket PC's. I am attempting to develop a system that will allow scientist to access information while in the field. I read somewhere that the pocket pc must be connected to a PC before it can access a sqll mobile database. I am currently searching for the answer to this question to ensure that I can do what I am wanting to do.
If this is not true, which I hope it isn't, can someone show me some quick connectivity code to connect to the database. I am using VB.NET to do this programming.
Any help will be greatly appreciated.
View 5 Replies
View Related
Sep 16, 2006
Hi, I am developing a small asp.net application where I read from a readonly omnis database via odbc then dependant on user input write records to a second database.My first idea was to use an odbc connection to Omnis database and write to ms sql database. There is quite a few queries that need to be made to the Omnis database and I am binding a datagrid to the MS Sql server database. I was hoping to use stored procedures to update the mssql tables. So there will be much opening and closing of connections. Should I go down that road or should i think of using an Access database, with linked table to the Omnis database, then only one connection needs to be made. And I can store my information in the Access database tables. Thanks.
View 3 Replies
View Related
Apr 12, 2006
I'm new to databases as you probably can tell. A friend sent me three data bases, which in my mind should have been one database with all the tables included, but he didn't. So my question is, can you pull info from two databases in the same query?
I write the query acessing one database and the result chart must depend on a where predicate based on accessing tables in another database. If this isn't possible, how do I get the tables I need together, that presently reside in differing databases?
Thanks for the help in advance.
Milfredo
View 8 Replies
View Related
May 25, 2007
Hi,
If I have 2 mobile databases, 1 on my desktop and the other on a PDA, how do i synchronize both these database? Are there any vb samples where i can refer to?
thanx
View 4 Replies
View Related
Nov 30, 2006
Hi everyone,
First of all I'd like to say I'm new to the forums, and in fact new to ASP.net.
I've had a couple of applications running in VB.net for the last year or so that I now am looking to move on and into ASP.net (main reason is to do with implementation to remote sites in foreign countries).
I'm currently following through the "Working with data and ASP.net 2.0" walkthrough on this site, which I must say has been a great help.
I'll start with the background stuff first
I have my main database on an SQL server. I also have 2 other databases on there - Customer and Employee. The reason for these are that they are shared amongst my VB applications and I kept them as seperate databases so that one database is all that needs to be administered and maintained, and these changes are then seen on both apps (takes away redundant data as well).
In my main database, main table, is a field called CustomerID. This value relates to the CustomerID in the Customer table. In my VB app all I do is have the user select a customer name, and then the customer ID value is copied to the CustomerID field of my main table when inserting / updating a row. This is simply accomplished with 2 SQL connections and 2 dataAdapters. I also use 2 dataSets - one for Customer, one for WorkRequests (the main database)...
I use ComponentOne stuff so that my grid will show the CustomerName instead of the CustomerID etc, and the same applies when I use my Employee database - I run many dataAdapters to this for things such as Account Manager, Technologist, Creator, UpdatedBy etc etc.
Now, I'm new to VS 2005 - my apps were created in VS 2003 and .net 1.1. Can I easily re-create my apps in ASP.net? My primary goal at the moment is to make sure I can load a row, and display the "lookup" values instead of the "integer" value. As my tables are in seperate databases, I would like to know the best way of accomplishing this, if it is of course possible.
Help and advice much appriciated.
Kind Regards,
Luke
View 2 Replies
View Related
Apr 10, 2002
hello,
i have a simple question and i am not familiar with sql7.
is it possible to access a sql server 6.5 from the admintools installed with sql 7.0
thanks
klaus
View 2 Replies
View Related
Jul 23, 2005
Hello all. I have just built another PC (New PC)and have it connected to myOriginal PC via a LAN. I have my SQL Server 2000 installed on the OriginalPC. Both PCs use WinXP Pro OS. I believe I now have to install the ClientTools on the New PC but after that, how do I access the SQL Server that ison the Original PC. The SQL Server is setup with mixed (both WindowsAuthentication and SQL Server Authentication). Just how do I use the SQLQuery Analyzer that I just installed on the New PC to connect to andretreive data from the SQL Databases which are on the Original PC? Thanksin advance for any help, Jim.
View 1 Replies
View Related
Sep 17, 2007
Hey, Everyone - I have downloaded two of the sample databases and get the following error when I attempt to open them:
Unable to open the physical file "c:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDATAAssets_Maintenance_log.ldf". Operating system error 2: "2(The system cannot find the file specified.)". (Microsoft SQL Server, Error: 5120)
So what am I doing wrong? The install of these sample databases is simple and straight-forward.
Thansk!
Regards,
Bob Mitchell
View 7 Replies
View Related
Sep 26, 2006
I am looking for a tool that can generate upgrade scripts for all deployed versions of my db application. Does anyone know of such a tool?
View 4 Replies
View Related
Feb 28, 2008
Hi There,
I would like to know what the recommended Number of Sql Mobile Databases Per Application?
I appreciate any response!
Thanks!
View 12 Replies
View Related
Apr 7, 2008
I am trying to determine if it is possible to add transaction support for a SSIS package. Here are the basic tasks:
Read New/Updated records from SQL Server
Update changed records in Access
Insert new records into Access
Update new records in SQL Server with Access key assigned on insert in previous step
Reset dirty_flag
I would like to wrap a transaction around this. If the package fails in the task that updates sql server with the Access key, the next time it runs, it duplicates the new records in Access because it did not finish the process. Is it possible to have a transaction wrap this entire process so I can undo the inserts to Access if I fail any subsequent tasks?
Thanks,
Steve
View 1 Replies
View Related
Nov 22, 2007
Hello,
My next project(in VB.NET 2005) would involve accessing different DBs and tables in remote SQL servers
What are the steps that need to consider first? Are there any settings that needs to be done in the servers?
k
View 1 Replies
View Related
Apr 11, 2007
Hello,
I've written this stored proc, which have to collect records in one table in several databases. These tables contains very few records (1 to 10 max). In SQL Server standard edition, this stored proc is executed instantaneously. But in the Express, it could take 1 minute.
Is there a solution to this problem ?
Thanks in advance,
Best regards,
Guy
ALTER procedure [dbo].[SP_CHECK_USERS]
AS
select 'FIDUCIAIRE' as code,moment,nom,machine from MERCATORFIDUCIAIRE.dbo.sessions s1 where (s1.inactif=0) and (s1.nom<>'MercatorIshop')
union select 'TEST1 ' as code,moment,nom,machine from MERCATORTEST1.dbo.sessions s2 where (s2.inactif=0) and (s2.nom<>'MercatorIshop')
union select 'TEST10 ' as code,moment,nom,machine from MERCATORTEST10.dbo.sessions s3 where (s3.inactif=0) and (s3.nom<>'MercatorIshop')
union select 'TEST11 ' as code,moment,nom,machine from MERCATORTEST11.dbo.sessions s4 where (s4.inactif=0) and (s4.nom<>'MercatorIshop')
union select 'TEST12 ' as code,moment,nom,machine from MERCATORTEST12.dbo.sessions s5 where (s5.inactif=0) and (s5.nom<>'MercatorIshop')
union select 'TEST13 ' as code,moment,nom,machine from MERCATORTEST13.dbo.sessions s6 where (s6.inactif=0) and (s6.nom<>'MercatorIshop')
union select 'TEST14 ' as code,moment,nom,machine from MERCATORTEST14.dbo.sessions s7 where (s7.inactif=0) and (s7.nom<>'MercatorIshop')
union select 'TEST15 ' as code,moment,nom,machine from MERCATORTEST15.dbo.sessions s8 where (s8.inactif=0) and (s8.nom<>'MercatorIshop')
union select 'TEST16 ' as code,moment,nom,machine from MERCATORTEST16.dbo.sessions s9 where (s9.inactif=0) and (s9.nom<>'MercatorIshop')
union select 'TEST17 ' as code,moment,nom,machine from MERCATORTEST17.dbo.sessions s10 where (s10.inactif=0) and (s10.nom<>'MercatorIshop')
union select 'TEST18 ' as code,moment,nom,machine from MERCATORTEST18.dbo.sessions s11 where (s11.inactif=0) and (s11.nom<>'MercatorIshop')
union select 'TEST2 ' as code,moment,nom,machine from MERCATORTEST2.dbo.sessions s12 where (s12.inactif=0) and (s12.nom<>'MercatorIshop')
union select 'TEST20 ' as code,moment,nom,machine from MERCATORTEST20.dbo.sessions s13 where (s13.inactif=0) and (s13.nom<>'MercatorIshop')
union select 'TEST21 ' as code,moment,nom,machine from MERCATORTEST21.dbo.sessions s14 where (s14.inactif=0) and (s14.nom<>'MercatorIshop')
union select 'TEST23 ' as code,moment,nom,machine from MERCATORTEST23.dbo.sessions s15 where (s15.inactif=0) and (s15.nom<>'MercatorIshop')
union select 'TEST3 ' as code,moment,nom,machine from MERCATORTEST3.dbo.sessions s16 where (s16.inactif=0) and (s16.nom<>'MercatorIshop')
union select 'TEST4 ' as code,moment,nom,machine from MERCATORTEST4.dbo.sessions s17 where (s17.inactif=0) and (s17.nom<>'MercatorIshop')
union select 'TEST5 ' as code,moment,nom,machine from MERCATORTEST5.dbo.sessions s18 where (s18.inactif=0) and (s18.nom<>'MercatorIshop')
union select 'TEST6 ' as code,moment,nom,machine from MERCATORTEST6.dbo.sessions s19 where (s19.inactif=0) and (s19.nom<>'MercatorIshop')
union select 'TEST7 ' as code,moment,nom,machine from MERCATORTEST7.dbo.sessions s20 where (s20.inactif=0) and (s20.nom<>'MercatorIshop')
union select 'TEST8 ' as code,moment,nom,machine from MERCATORTEST8.dbo.sessions s21 where (s21.inactif=0) and (s21.nom<>'MercatorIshop')
union select 'TEST9 ' as code,moment,nom,machine from MERCATORTEST9.dbo.sessions s22 where (s22.inactif=0) and (s22.nom<>'MercatorIshop')
View 2 Replies
View Related
Aug 8, 2006
I have several database files, all in the same directory. I want to write SQL statements that access two databases at once. For example, if only one database would be involved, I would write:
SELECT Test_Source_ID_column, Data_column
INTO Test_Destination_table
FROM Test_Sources_table
The above query copies two columns (Test_Source_ID_column and Data_column) from Test_Sources_table into a brand new table called Test_Destination_table.
Now the above query is fine for both the old and new tables being in the same database. But what if Test_Sources_table is in file Old.dbf and I want the new table Test_Destination_table to be in New.dbf?
Both Old.dbf and New.dbf are in the same directory. Therefore, there is no security issue about using ......etcpasswords. I should therefore be able to use relative paths. So, I also want to know how I can do that select on two databases in the same directory without typing long, long paths.
Is there a way to do queries that access multiple database files (all database files being in the exact same directory) AND use relative paths or no paths (and certainly not type a full path)?
NOTE 1: I'm using SQLEXPRESS, therefore do not have the SQL Server 2005 tools. I have Visual Studio 2005 Developer Edition with its tools.
NOTE 2: One table is accessed through ODBC. The other table is accessed through SQLEXPRESS.
View 5 Replies
View Related
May 16, 2006
Hi ,
I have around 5 databases with same structure used to store data for different locations and services.
I have created an intermediate database which will have all the stored procedures to access data from above 5 databases.
My queries are common to all the databases. so,I would like to pass database name as an argument to my stored proc and execure query on specified database.
I tried this doing using "USE Databasename " Command. but it says ...We can not use "USE command " in stored proc or triggers. so ..what i did is ..
--------------------------------------------------------------------------------------------------------------
CREATE PROCEDURE TestDB_access(@dbname varchar(100))
AS
BEGIN
DECLARE @localDB varchar(100)
Set @LocalDB=@dbname
if @LocalDB='XYZ'
EXEC ('USE XYZ ')
elseif @LocalDB='ABC'
EXEC ('USE ABC')
Select * from Mytable
END
---------------------------------------------------------------------------------------------------------------
When I run this from my database , it gives me an error "unable to find table "mytable".
What is the best way to make my queries work with all the databases.
Thanks in advance
Venu Yankarla
View 4 Replies
View Related
Mar 6, 2008
Based on our database infrastructure, we need to secure our SQL databases. The security issue concerns on allowing a limited number of Domain Admin users to access the SQL databases.
We tried certain ways, based on the documents in the Microsoft web site, but we couldn€™t reach to the point of preventing the Domain Admin users accessing the SQL databases.
Thanks in advance.
View 5 Replies
View Related
Nov 8, 2015
We have a system that uses 3 databases, one for Membership db standard MS membership only the application has access to that data, one with User Data which we would like to make multi-tenant using Schema-Separation, and a third read-only reference db which is Common Market data for all users.we anticipate Tenant numbers in the thousands.Current we have multiple queries which create joins between the Main db and the Reference database using something like
Selec S.*, M.ScheduleDate, M.substation from Sites S left outer join Market.dbo.MarketUnit M where S.MarketUnitID = M.MarketUnitID
i'm planning to have a new schema for each Tenant on the Main Database, so I would create a Schema T1 for the first customer, a user T1User with access to T1 schema. and grant T1User access to Market.dbo. My First question is are there any concerns about the above T1User setup? My second question is, are there any tools which would automate the setup of the multi-tenant with schema separation, or should I just script the whole Main Database schema creation and replace schema name globally and then execute the script?
My Third question, how about upgrade and updates... currently using VS to compare dev/qa/prod database to identify changed which need to be promoted, and pushing updates... this could be a big pain to promote code to thousands of Schemas. grantedwe will likely keep the overall number of schemas spread over different SQL servers.
View 2 Replies
View Related
Oct 9, 2006
I have a sql2005 express database I am using in a vb2005 application. I have read a bunch and can't seem to find a clear (to me) example of how to call a stored procedure. I have a procedure that runs ok in the query builder, but don't have a clue about how to call it now that it is written. SO.
call the database MYdatabase
call the Stored procedure MYStoredproc.
Any help?
Dave
PS: it dosen't require and values passed to it, its very simple.
View 4 Replies
View Related
May 11, 2007
Can i send a command from my vb2005 program to tell the database to make a backup? Or how is this else done...
View 4 Replies
View Related
Apr 25, 2008
Hi,
I started working with Visual Basic 2008 and created a local database that I would like to use in a Visual Basic 2005 project.
When I attempt to open the local .sdf file, I get the following error:
"You are trying to access an older version of SQL Server Compact Edition database. If this is a SQL Server CE 1.0 or 2.0 database, run upgrade.exe. If this is a SQL Server Compact Edition 3.0 or later database, run Compact/Repair. [Db version=3505053, Requested version=3004180...."
Where do I find upgrade.exe or the Compact/Repair utility?
Are there any other migration tools you would recommend?
Thanks in advance,
-Ben
View 7 Replies
View Related
Dec 19, 2006
Im used to using access and now im gonna switch to sql server 2005 express. My program is coded in Visual basic 2005 where all connection is made to the access database by oledb.
Now when im creating the database in management studio express, ive noticed that there is no boolean datatype, but instead there is a bit datatype.
Is this the one to use, and would the bit datatype accept true/false values when sending sql commands? In visual basic2005 i think that it uses 0 for true and -1 for false or something like that, so when switchin database i would have to recode quite a bit.
Or is simpler than this?
View 1 Replies
View Related
Jan 16, 2008
Ok, I'm using vb2005 express and I know that the reportviewer control has to be added and reports can't be designed from the IDE. So, I downloaded the business intelligence studio and I can design a report that looks like just what I want. What I can't seem to do is add that report to the application I'm developing. I don't want to use a report server - I want to use the report with client side processsing. I'm wondering if this is possible and if so how? When I try to add that .rdl file or rename it to a .rdcl file to my project I'm not allowed to do so. Any thoughts?
View 4 Replies
View Related
Aug 17, 2006
Well I'm hoping I'm asking this in the right place. But probrably not. I am using VB2005 express and have Access 2007 beta. When I try to add a new data source VB is looking for a .mdb database type. However Access 2007 beta uses .accdb. I'm not sure how to get these two talking since in the vb drop down boxes all it list is a connection on access with .mdb and all files. When I try all files and pick the accdb data I get the "Couldn't connect with data sorce c:blahblah/bills.accdb.mdb. This an error or am I just totally off the mark? Any help would be appreciated.
View 2 Replies
View Related
May 1, 2007
In both VB6 and VB2005 Both are loaded on same computer. When attempting to write to an access database table using ADO I get a runtime error: -2147217887(80040e21) "mutiple-step operation generates errors. Check each status value. " Reading the database is no problem. I only get the errors when writting to database. I have used the following code forever in VB6 and never got this error. Now that I have Visual Studio 2005 loaded on the same machine. I get this error. I get the exact same error when using this code in VB2005. I know VB6 but am just learning 2005. The following code is writting to a database table from various user imputed text and combo boxes. I used basicly the same code in VB2005 and get the same exception error. This code works on machines that do not have VB .net loaded. How do I fix this. My application is useless unless the user can make changes to their data.
Public Function ActionToDb()
Dim noPo As Integer
Dim SQL As String, rst As ADODB.Recordset, dataSourceName As String
dataSourceName = DBPATH & "LVBURV Database.mdb"
dbConn.ConnectionString = "DBQ=" & dataSourceName & ";Driver={Microsoft Access Driver (*.mdb)}"
dbConn.Open
On Error GoTo ErrorHandler
Set rst = New ADODB.Recordset
With rst
SQL = "Select [mLVbuNo], [mStratInit], [mMerticLv],[mSubMetLv],[mTaskAction],[mImpact]," & _
"[mStatus], [mOwner], [mTitle],[mOrigDate],[mCurrentDate],[mCopmpleteDt],[mComment],[mSource]," & _ "[mStatColor],[mHyperlink],[CompCheck] From [tblMasterActionItem]"
.CursorLocation = adUseClient
.Open SQL, dbConn, adOpenKeyset, adLockBatchOptimistic, adCmdText
noPo = .RecordCount
'If .RecordCount > 0 Then
.MoveLast
.AddNew
rst.Fields("mLVbuNo") = giRecNo
rst.Fields("mStratInit") = frmActionDe.cboStatInit.Text
rst.Fields("mMerticLv") = frmActionDe.cboMetricLever.Text
rst.Fields("mSubMetLv") = frmActionDe.cboSubMet.Text
rst.Fields("mTaskAction") = frmActionDe.txtTask.Text
rst.Fields("mImpact") = frmActionDe.txtImpact.Text
rst.Fields("mStatus") = frmActionDe.txtStatus.Text
rst.Fields("mOwner") = frmActionDe.cboOwn.Text
rst.Fields("mTitle") = gstOwnT
rst.Fields("mOrigDate") = frmActionDe.txtOrigDt.Text
rst.Fields("mCurrentDate") = frmActionDe.txtCurDt.Text
rst.Fields("mCopmpleteDt") = frmActionDe.txtCompDt.Text
rst.Fields("mComment") = frmActionDe.txtComments.Text
rst.Fields("mSource") = frmActionDe.cboSource.Text
rst.Fields("mStatColor") = frmActionDe.txtStatColor.Text
rst.Fields("mHyperlink") = frmActionDe.txtHyperlink.Text
If optCompCheck.Value = True Then
rst.Fields("CompCheck") = True
Else
rst.Fields("CompCheck") = False
End If
'End If
.Update
.Close
End With
dbConn.Close
ExitSub:
On Error Resume Next
dbConn.Close
Set rst = Nothing
Set dbConn = Nothing
Exit Sub
ErrorHandler:
WriteToErrorLogEnd Err.Description & " in ActionToDb"
Resume
End Function
View 6 Replies
View Related
Jul 24, 2007
I am using VB2005 , Windows CE 5.0 , SQL server 2005 compact edition
and using XML reader, but it will show the empty SQLCeException ,
why does it occur?
The source it show at the follow :
-----------------------------------------------------------------------------------------------------------------
Imports System.Data.SqlServerCe
Imports System.Xml
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim DBPath As String
Dim mydr As XmlTextReader = New XmlTextReader(m_sXMLFileName)
mydr.WhitespaceHandling = WhitespaceHandling.None
While mydr.Read()
' Look for the <configuration> section
' This lets us add several peices in the config file
If mydr.Name = "DBPath" Then
DBPath = mydr.Name
End If
End While
mydr.Close()
Me.MobileDataTableAdapter.Connection.ConnectionString = "Data Source =""Program FilesCEdatabaseMobileDatabase.sdf"";"
Try
If MobileDatabaseDataSetUtil.DesignerUtil.IsRunTime Then
'TODO: Delete this line of code to remove the default AutoFill for 'MobileDatabaseDataSet.MobileData'.
Me.MobileDataTableAdapter.Fill(Me.MobileDatabaseDataSet.MobileData)
End If
Catch ex As SqlCeException
MessageBox.Show(ex.Message)
End Try
End Sub
End Class
View 4 Replies
View Related
Aug 8, 2006
Dear ppl,
I am writing an application for a device (MDA Pro T-Mobile) having Windows Mobile 5.0 using
-MS .NET Compact Framework 2.0 SP-1
-SQL Mobile 2005.
-VS 2005 .NET
The application uses Merge Replication. The error occurs in the Synchronise() Method of the SqlCeReplication object.
"SQL Server Mobile encountered problems when opening the database."
repl.AddSubscription(AddOption.CreateDatabase);
repl.Synchronize();
I don't understand why I am having this error. It does create the database on AddSubscription() method but it is failing opening the database on Synchronise(). I have also tried uninstalling and then reinstalling all the SQL Mobile components in the following order.
-sqlce30.wce5.armv4i.cab
-sqlce30.repl.wce5.armv4i.cab
-sqlce30.dev.ENU.wce5.armv4i.cab
However, when i run this application on a device(Dell X50 AXIM) with Pocket PC 2003, it runs fine creating the database and sysnchronising it.
The target platform for the project is Windows Mobile 5.0 Pocket PC SDK.
Does any one have any clue what could be the problem ?
Regards
Nabeel
View 6 Replies
View Related
Jun 15, 2006
I am migrating a pocket PC application from VS 2003 to VS 2005 and a few weeks ago I hit the following problem when replicating
A SQL Mobile DLL could not be loaded. Reinstall SQL Mobile. [ DLL Name=sqlceca30.dll]
Scanning forums for help I saw that other people had had this problem and one
http://www.eggheadcafe.com/aspnet_answers/NETFrameworkCompactFramework/Feb2006/post25814466.asp
suggested that this problem could be circumvented by getting the replication object early and then continuously using the same object for subsequent replications.
I did this and it works a lot better now but ever so often I get another error which is
Native Error 28559 SQL Mobile encountered problems when opening the database
My only option at this point is to stop and start the application which cures the problem.
View 4 Replies
View Related
Mar 23, 2006
Hello,
I am developping a non-managed C++ application for PocketPC using a SQL Server mobile database.
The application is compiled for PocketPC 2003 and uses SQL Server Mobile v2. I use Visual Studio 2005. But I need to compile the application for Windows Mobile 5.0 devices. So I installed the WM5 SDK and had the WM5 into my project configuration.
The "ssceoledb.h" which I include incluses the "transact.h" file. But my problem is that this file is only provided with the PocketPC 2003 SDK and not in the WM5 SDK.
So I cannot use the WM5 configuration project with SQL Server. I also tried with the last SQL Server Mobile 2005 (ie v3.0) and the "ssceoledb30.h" also includes "transact.h".
Did I miss something to install ?
Do you know how I can resolve the problem ?
By advance, thank you for any answer.
--
Gregoire
View 9 Replies
View Related