Solved

SQL CE in VB.Net Error!

Posted on 2004-03-30
8
458 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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 500 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

747 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now