Can't get SQL Server CE to work with Visual Studio 2005 and Windows CE 5.0 - visual-studio

I have been trying to make SQL Server CE work with Visual Studio 2005 for the past 4, 5 hours. but no luck. When I run my application I get the following error:
Can't find PInvoke DLL 'sqlceme35.dll'
I have read countless threads and articles on it but unable to make it work. Using the following tools:
Windows CE 5.0 device running Intel Bulverde processor
Windows XP 32 bit with Visual Studio 2005
SQL Server Compact 3.5
Here is what I did.
Created a new "Smart Device" project and selected "Windows CE 5.0"
Installed SQL Server Compact 3.5 (on Windows XP) which installed a bunch of folders and files
In my project I added a reference to "System.Data.SqlServerCe.dll" which is inside folder where SQL Server Compact 3.5 is installed
Then I wrote a few lines code as below which I copied from http://msdn.microsoft.com/en-us/library/aa226134(v=sql.80).aspx
SqlCeEngine engine = new SqlCeEngine("Data Source = Test.sdf");
engine.CreateDatabase();
conn = new SqlCeConnection("Data Source = Test.sdf");
conn.Open();
Then I installed "sqlce.dev.ENU.wce5.x86.CAB", "sqlce.repl.wce5.x86.CAB" and "sqlce.wce5.x86.CAB" from "wce500\x86" on target device which created a bunch of DLL files in folder "Microsoft SQL Server Compact Edition"
Then I ran my program but I got error as described above. The error is being thrown by line SqlCeEngine engine = new SqlCeEngine("Data Source = Test.sdf");
I thought may be I need to copy all DLLs from folder "Microsoft SQL Server Compact Edition" to my application folder on target device from where my program was running so I copied all files but still same error.
And then I thought may be I need to use "armv4i" instead of "x86" so I first installed "sqlce.wce5.armv4i.CAB", "sqlce.repl.wce5.armv4i.CAB", "sqlce.dev.ENU.wce5.armv4i.CAB" and as expected it didn't work. So I again copied all DLLs into my program folder but no luck.
What am I doing wrong?

The Bulverde, IIRC, is the PXA27x series processor which is definitely an ARM core, not an x86, so you must use the ARM binaries.
Start by making sure you have a factory-reset device (the registry would be the important bit to reset).
Then use the CAB (or just the binaries directly) from this folder:
%PROGRAM_FILES%\Microsoft SQL Server Compact Edition\v3.5\Devices\wce500\armv4i
Make sure that the System.Data.SqlServerCe.dll assembly is on the device (typically in your application folder).
If it still fails, you probably are missing a dependency. Run depends.exe (on the desktop) against the SQL Compact binaries to see what they need and ensure those are on your target.

Related

Oracle Developer Tools 12 install fails claiming I have Windows XP. I have Windows 7

I got ODTwithODAC121021 here It installs the Oracle Client, ODAC, and ODT bits.
When I run the installer, the prerequisite check fails with this:
Reference data is not available for release "12.1" on the operating system distribution "Windows XP5.1".
I actually have Windows 7 Professional SP1
Huh?
My intent is to get the ODT bits into Visual Studio 2010 so I can use Server Explorer and Entity Framework. I don't really need a new Oracle Client, I've already got one installed to match our 11g server version, but it seems I can't pick and choose with this installer, which won't run.
Suggestions? thanks.
This is a bug in this specific version of the Oracle Installer. Here is the workaround:
After making sure the installer is not running, please open up this file in the staging area where you unzipped ODAC:
....\stage\cvu\cv\admin\cvu_config
And in that file change the CV_ASSUME_DISTID value that is there to 6.1
Then save the changes and run the installer again.
This will force the installer to assume you have Windows 7.

Oracle.DataAccess.dll not in Visual Studio 2008 ".NET" reference list

I've got two Windows XP machines with both Visual Studio 2008 and Oracle Client 10.0.2.0.1 installed. One is a development machine and the other one a dedicated build machine. The machines were probably not set up the same way.
On my development machine, I've included Oracle.DataAccess.dll (version 10.2.0.1.100, not the asp.net v 2.x one) in a C# project. Note that the System.Data.OracleClient dll is insufficient (I don't properly remember why, I think it had something to do with bulk insertion/selection).
I was able to select that DLL from the Project->Add Reference dialog in the .NET tab.
Now on the build machine, I cannot build the project as it cannot find the .dll. The .dll is located in the same folder as on the development machine, (<installdir>\10.2.0\client_1\bin\Oracle.DataAccess.dll) in the same version.
The .dll is however not displayed in the .NET tab.
I tried (re)installing ODAC with ODP.Net for VS 2008 but it didn't change anything. When looking at the registry, I realized that my Development machine had a registry folder
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft.NETFramework\AssemblyFolders\ODP.Net]
which points to the bin directory of my oracle installation. This entry does not exist on the build machine. Unfortunately, manually adding the key did not make Visual Studio find it (I've tried rebooting).
My main question is:
What do I have to do so the Build Machine automatically finds the Oracle.DataAccess.dll? (Note: manually adding the .dll each time the solution is changed would work, but that is not an option).
You can maybe help me out already by answering one of the following subquestions:
Which installer sets that registry entry?
Do I maybe have to reinstall the whole Oracle Client in a different configuration? (e.g. ADMIN)
Do I need more than just the Oracle Client, ODAC and .NET installed?
I managed to resolve the issue by completely uninstalling the Oracle Client on the build machine, then doing a fresh installation using the Administrator configuration rather than the Developer configuration.
Note that installing the Administrator configuration on top of the existing oracle installation did not work.

Visual Studio 2008 Debugging Windows Embedded CE 6.0 application

I'm trying to debug a Windows CE 6.0 embedded application built with the STANDARDSDK_500 (ARMV4I) SDK using Visual Studio 2008. It builds and deploys however when it gets to the stage of starting the application it throws up the error "Unable to start debugging".
I am able to connect to the remote registry so CoreCon is running and connecting OK. I have connected as a "Windows CE Device" using a fixed IP address (although I have also tried dynamic IP address).
At this stage I have no idea what the problem is, I've checked the executable with dependency walker and the only 2 DLL's missing are COREDLL.DLL and WS2.DLL which are both present on the CE device in \Windows.
I've tried starting the built executable on the device and nothing happens. I have configured the CE device to create dump files but nothing is created.
Any ideas what could be wrong? What I can check next?

VB6 - A foxpro 2.6 no isam error on XP

The boss handed me some rather ancient legacy code, all done in VB6. After installing Visual Studio 6 and a few other things, I'm finally able to open the project and actually compile/run it. My new problem comes from this line of code:
Set db = DBEngine.Workspaces(0).OpenDatabase(ThePath$, False, ReadOnlyFlag, "FoxPro 2.6;")
I get the error "Cannot find installable ISAM"
I'm not sure what I'm missing. I've done some searching and I have things like MSJET35.DLL in system32 and the registry. Access is installed (I tried it with both Access 2002 and 2003). I would expect this to be a problem with Windows 7 or Vista, but this is in XP, service pack 3.
Any thoughts anyone?
The FoxPro drivers are not included in MDAC 2.6 and beyond. Download the appropriate install for either ODBC or OLEDB
FoxPro ODBC drivers
FoxPro OLEDB drivers
FoxPro 2.6 requires a dll called msxbse35.dll
Copy it into your system32 directory and run regsvr32 msxbse35.dll to register.
Your program will then run fine on that computer.

Register dll/tlb

I'm attempting to register a GIS based dll on a test computer and I'm having problems loading in the tlb file with ArcGIS 9.3.1 - ArcMap on the test computer. When I attempt to load the tlb file is says "No New Objects Added". I created the dll file using Visual Studio 2010. The tlb file loads fine on my developer computer. I'm registering the dll/tlb on the test computer by using cmd.exe command (see below).
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe C:\Temp\My.dll /tlb:My.tlb/codebase
The registration replies as successful and the item is listed in the Component Category under the MX Commands category. Below is the COM GUIDs portion code that I'm using within my class.
#Region "COM GUIDs"
Public Const ClassId As String = "1bf94bdf-907c-4026-816f-50feb7a2a976"
Public Const InterfaceId As String = "7ba8a4d5-d15c-4d95-a819-a3e7cbe84533"
Public Const EventsId As String = "2ab51582-47e1-490c-899d-a80992c20fdf"
#End Region
The OS of the developer computer is:
Microsoft Windows XP 32bit,
Version 5.1 - Service Pack 3
AND
The OS of the test computer is:
Microsoft Windows XP 64bit,
Version 5.2 - Service Pack 2
Do I need to do a Windows Update on the developer computer (to 5.2) or is there something wrong in my dll/tlb registration method?
Thanks for your help!
UPDATE:
The ArcGIS software on the test computer is installed under the C:\Program Files (x86) location.
I think you need to register it using the 64-bit version of RegASM on your target PC. You should find it in:
C:\Windows\Microsoft.NET\Framework64\v2.0.50727
^^
Note that I'm assuming that you have compiled your code to MSIL (by selecting AnyCPU as the platform). If you have compiled it to target 32-bit, then you will need to change that.
This is because a 64-bit process cannot find registrations performed by the 32-bit version of RegAsm, and vice-versa.

Resources