Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

SQL CE in VB.Net Error!

Posted on 2004-03-30
8
Medium Priority
?
482 Views
Last Modified: 2009-12-16

I am trying to create an application for a Pocket pc using vb.net. When I deploy the application to the emulator I get the error

Unknown connection option in connection string provider

THis is the code

Dim LocalConnection As String = "Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0;Data Source=\My Documents\invDB.sdf"
 Dim dbConn As New SqlCeConnection(LocalConnection)


I have sql server developer editoin installed as well as SQL server CE 2.0



0
Comment
Question by:JonMny
  • 2
  • 2
  • 2
8 Comments
 
LVL 48

Expert Comment

by:Mikal613
ID: 10716133
0
 
LVL 7

Expert Comment

by:ramesh12
ID: 10716364
I use something like this

            strProgramPath = "\Storage Card\kbb"
            strLocalDatabaseFile = strProgramPath & "\KBBdb.sdf"

            strLocalConnString = "Data Source=" & strLocalDatabaseFile
            ' Create SQL Server CE connection object.
            '
            cn = New SqlCeConnection(strLocalConnString)
0
 
LVL 7

Expert Comment

by:ramesh12
ID: 10716425
Try removing provider option
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 9

Author Comment

by:JonMny
ID: 10725882
none of these options work, I cannot leave out the provider it just gives me an error, the link used the exact same provider string that I did.
0
 
LVL 48

Accepted Solution

by:
Mikal613 earned 1000 total points
ID: 10725922
To resolve this problem, copy the files from the C:\Program Files\Microsoft SQL Server CE\Device\x86\I486 folder instead of the C:\Program Files\Microsoft SQL Server CE\Device\x86\Emulation folder.
0
 
LVL 9

Author Comment

by:JonMny
ID: 11410568
please give me a refund
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question