[RESOLVED] SDF file with Vista return nothing
Hi all,
Process:
I have one PC application and one Win CE application.
In PC app, it will get data from SQL Server Express and insert data into SDF file. (This SDF file is pre-defined template.)
Then copy this SDF file to wince terminal.
Win CE app will retrieve data based on user input ID and get the necessary information and display it on screen.
Problem:
What happen here is I tested this program on Windows XP Professional OS and its working OK. Nothing wrong.
I can insert data into SDF file and copy to terminal and terminal application can display the correct data based on user input ID.
But when I test on Vista Home Premium and Business edition, the application from terminal can't get the data. It always return nothing.
I copied this SDF(populated by vista) file and debug it from my windows xp machine, it also return nothing.
But when I use SDF (populated by XP) file in vista and transfer this SDF file from vista to terminal, my terminal can get the information based on input ID.
Anybody has this kind of problem before??
Please help me.
I need this in urgent.
I use VS 2005, SQL Express 2005 edition.
Thanks.
Re: SDF file with Vista return nothing
So you run an app on a Vista machine, populate an SDF, and copy it to a mobile device.
When you run on the mobile device nothing is there?
Are you sure you are using the same version of SQL Server CE on XP and Vista, and not using 2.0 on one, and 3.5 on the other?
Have you used query analyzer on the device to look at the database?
My guess would be different versions
Re: SDF file with Vista return nothing
Hi petevick,
thanks for your reply.
Quote:
Originally Posted by
petevick
So you run an app on a Vista machine, populate an SDF, and copy it to a mobile device.
When you run on the mobile device nothing is there?
Yes. Its correct.
Quote:
Originally Posted by
petevick
Are you sure you are using the same version of SQL Server CE on XP and Vista, and not using 2.0 on one, and 3.5 on the other?
Yes, both dll version information is like below.
Assembly Version: 9.0.242.0
File Version: 3.0.5300.0
Product Version: 3.0.5300.0
File Location: C:\Program Files\Microsoft SQL Server Compact Edition\v3.1\
Quote:
Originally Posted by
petevick
Have you used query analyzer on the device to look at the database?
Sorry. I don't understand this question. You mean use Query Analyser from my wince device??? I don't install any query analyser in win ce. Is there any application?
And here is the update. I'm so blur didn't notice that my device can use tbl_user table in that SDF file generated by Vista.
That means SDF file generated by Vista can use on my WinCE for this user table.
But other tables i can't access.
My terminal/device first screen is Log-in Screen. I can pass this screen. I also trace it and found that it returns value from SDF file.
But when I tried to get the Student ID information, nothing return, although the data is inside that SDF file.
Note: My Win Ce 5.0 device is Atid AT 570 Scanner.
When I search through the device, I found this hidden file in Windows folder.
GAC_System.Data.SqlServerCe_v3_0_3600_0_cneutral_1.dll
File Version: 3.0.5206.0
Product Name: Microsoft (R) SQL Mobile
Product Version: 3.0.5206.0
These information is a little different from the above. And don't know why this file is inside that location.
I remember, when I copied bin folder for this WinCE application to device, there is no dll/libraries for this sql server ce. And I can use it without error.
Thanks.
scsfdev
Re: SDF file with Vista return nothing
You are SURE there is data on the SDF before you copy it to the device. Copying to the device does nothing except copy - no translation, nothing. Do you use wMDC to copy the file from the PC to the device?
You are SURE you are reading the SDF on the device that you copied??
If you deploy the developers option of Sql CE, then you will get a query application loaded.
Please check the data in the sdf before the copy and get back to us. I have never known a copy to do anything like this - I am sure you are overlooking something
Re: SDF file with Vista return nothing
Quote:
Originally Posted by
petevick
You are SURE there is data on the SDF before you copy it to the device. Copying to the device does nothing except copy - no translation, nothing. Do you use wMDC to copy the file from the PC to the device?
You are SURE you are reading the SDF on the device that you copied??
If you deploy the developers option of Sql CE, then you will get a query application loaded.
Please check the data in the sdf before the copy and get back to us. I have never known a copy to do anything like this - I am sure you are overlooking something
Hi petevick,
Thanks for your support and suggestions.
I found the problem.
The problem is:
In my SDF template, I set this ID to Primary and Unique. And then it will automatically assign 2 indices (index) for this table. And so when I try to search with this ID in my Device/Terminal, it returns nothing. I still don't know why it can't search.
Yesterday, I tried to search another fields and it returns result !!.
So, I focus on this ID key and found that it has these index value. So, I remove it but can't. And so I switch to edit table and set this "Unique" and "Primary" value to "No". This will also remove the index. And then I try again. This time its working!
So strange in this case. While I can use SDF's index on XP but why not in Vista????
Vista sure has too many incompatibility. (My previous big problem is Vista with Crystal report. It caused me to change my DB mapping of around 21 reports format. Really bad experience on Vista.) :mad:
Sign :(
Hope who face the same problem can find this thread and solve their case too.