|
Hi,
I tried with the physical path of my database
string chcc = @"Data Source = C:\\Users\\Admin\\Documents\\Visual Studio 2008\\Projects\\GMAOMobile\\ModeDifféré\\BaseGmaoLocale.sdf;";
SqlCeConnection sqlceconn = new SqlCeConnection(chcc);
but not still not working.
Concerning u note,I don't understand what u mean by:
The emulator also doesn't come with SQLCE, you will have to deploy it also,
For the reference,I have the reference System.Data.SQLServerCe
Thanks for u help
|
|
|
|
|
Yes that's the physical path on your PC, but the program will not run on your PC, will it?
The Emulator, or your smart device comes empty: it does not have the .net framework, it does not have SQL CE, it has just the OS, and some manufacturer or Microsoft supplied programs. .Net and SQLCE come in .cab files, supplied by Microsoft. When you copy your program to the emulator or to the the phone, Visual studio creates a deployment package that contains all these files(choosing the right ones for the processor type of your device), and copies this deployment package to the device. The emulator or the smart device will not have access to any files on your pc. So if your database file is stored somewhere on your PC, the emulator will not be able to reach it;
The database file probably does not exist on your PC either, except if you have created it using SQL CE for PC; The only thing that exists is an empty sdf file in the development environment. You've probably created the data connection in the ide, and it's now sitting in the 'server explorer' pane (the left pane in visual studio). Now add this data connection to your project (probably the right pane).
From then on, everything should be automatic. Visual studio will build the packages, select the cab files, copy them to your device, start the remote debugger....
Now, You've probably messed around so long with your project that a lot of the settings are messed up.
Start afresh, create a new project, a new database, and don't use any of the settings from the other project. Follow the tutorial exactly, and try to understand what is happening at each step. Once you have the tutorial running, create another new project, and this time use your specifications and your requirement. Test each step along the way, and if something does not work, check what you have done differently from the tutorial.
|
|
|
|
|
Hi,
Thanks a lot for u explanation.I vote for it.I follow u steps and the link bellow:http://msdn.microsoft.com/en-us/library/aa289160%28VS.71%29.aspx#grfvsdcopyingfilestotheemulator[^]
But still the same problem.I am fed up really of this exception.
I want to mention that when going to visual studio:menu tools->connect to device->connect and then to start->Progams->File explorer I found in the storage card my shared file \\Admin-PC\GMAOMobile.Can I use the storage card option to connect to my database??
thanks
|
|
|
|
|
I suppose you mean GMAOMobile.Cab. That's not the database. It's the cab file containing your program.But yes, nothing prevents you from putting the database on the storage card. Copy the DB (the sdf file) from the pc to the storage card, and, and refer to it as \\Storage card\GMAOMobile.sdf. (Don't know what your storage card is called, but it should appear as a directory in your mobile device).
|
|
|
|
|
|
Just out of curiosity, what version of visual studio are you using? (The instructions you pointed to were for visual studio 2003)
|
|
|
|
|
Hi,
I use Visual Studio 2008.
regards
|
|
|
|
|
|
hello everyone
I would like to know how to convert vb.net code in c#.
thanks
|
|
|
|
|
Google[^] not working where you are?
You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace
C/C++ (I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste) - fat_boy
|
|
|
|
|
Thank you for your reply, but after a rechreche on google, I found many solution, but I preferred to have the opinion of someone who already work in this direction, and thank you again.
|
|
|
|
|
|
|
The SharpDevelop IDE can convert those files automatically
I are Troll
|
|
|
|
|
I downloade SharpDevelop but I don't now how to use it ?
thank .
|
|
|
|
|
Open your solution, open the file that you want to convert, and select the menu "Convert code to" from the "Tools" menu
I are Troll
|
|
|
|
|
|
There's a handy Visual Studio 2008 addin called MoXAML Power Toys[^] that does this.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
|
Hello friends I have a Observable collection in my wpf window.
There is a textblock in my window which text initially should be "No Message yet" (when Observable collection is empty).
What I need to do is to set the text value of that textblock to " " when Observable collection changes (count becomes > 0)
how Can I do this.?
Any help or hints would be highly appreciated.
Thanking in Advance
Johnny
|
|
|
|
|
Subscribe to the CollectionChanged event, and set your text accordingly
|
|
|
|
|
Yes I understand I can do this using event aggregator. but I was wondering if it can be done using trigger in xaml.
If it's possible plz let me know.
Thanking again
Johnny
|
|
|
|
|
|
Hi,
Is there any control or dll which can be used for showing map without using internet connection in .net which works in windows application and which can show the point information in pop up
Thanks
|
|
|
|
|
kjsl2k9 wrote: Is there any control or dll which can be used for showing map without using internet connection in .net
The problem you face is lack of Internet connectivty, the amounts of data in mappring are generally massive and costly to prepare by the provider. Google and Microsoft can do this for free due to economies of scale.
Yoiu will almost certainly not get anything for free, but there will be paid (and probably expensive) things you get for 3rd party suppliers.
Hopefully someone else will have a more positive response.
Dalek Dave: There are many words that some find offensive, Homosexuality, Alcoholism, Religion, Visual Basic, Manchester United, Butter.
Pete o'Hanlon: If it wasn't insulting tools, I'd say you were dumber than a bag of spanners.
|
|
|
|