Visual Basic 2010 Application with SQL Server CE, database not accessible on Windows XP - database

I was developing an Application that requires a database to store and retrieve data. I am developing the applcation on Visual Basic 2010 Express Edition and using SQL Server Compact Edition for database, on a Windows 7 PC. The Application works perfectly on Windows 7 on my PC. The problem arises on the system of my client who is using Windows XP.
I asked him to install .NET Framework 4.0 and SQL Server CE and send him a copy of the build Application. But when he executed the application and reached a form where database was being used, he encountered and error saying "Access to the database file is not allowed. [ File name = D:\prototype\app\master.sdf ]" and on clicking on continue the form loads but data from the database is not loaded, since it's not connected.
The same problem occurs on windows 7 if i copy the app folder to Program Files directory on Windows 7. But It doesnt occur if i execute the application as "Run as Administrator"
So I require your help to figure out what might be going on and why can't the application access the database simply as it is working on windows 7 (except in the program files directory).
Thanks in advance,
Best Regards

"The user need read-write access to the database file, so you must put it in an suitable location, and change your connection string accordingly."
http://erikej.blogspot.dk/2011/02/using-sql-server-compact-40-with.html
By EricEJ

Related

SQL Server CE 4.0 Embeded Deployment Issues

Can someone point me in the right direction? I am developing an application where I am using SQL Server CE as an imbedded database. To do so, I put the “7 Dlls” that comprise the CE edition in the same folder as the EXE file along with System.Data.SqlServerCe.dll and then in code registered the COM objects. Wow, I was so pleased because everything worked. Being careful, I wanted to confirm all was well and uninstalled the SQL Server CE that I used for development. Fine! The app still worked. Going a step further I removed the 7 Dlls, leaving only System.Data.SqlServerCe.dll. I expected then to see that the application crashed. I was astonished because the application still worked. I then did a Windows folder search of my entire computer to find the 7 Dlls. The search found nothing, so I’m puzzled as to why.
I do have a local installation of SQL Server 19 on my computer. Is it possible the app is using some of the files in SQL Server 19? I’m at the end of my wits.
I have tried to find another app trhat uses CE and have searched for files that may have been installed. I also did a registry search and found nothing.
My goal is to deploy this Windows desktop program with confidence it will function properly.
Thanks for any help with my problem.

Creating Local SQL Database in UWP application

How can I create a local database for a Windows 10 desktop App (Software for Windows 10 Computer) in visual studio 2017?
I want to create a Windows 10 application and to have a local database to the Computer itself. I don't want any online database like Azure.
I am working on a software for tuition classes.Where the User Enters the data of Students (more than 2000 student's data and some Documents(Images), approx 5 to 10 new entries every day So I want everything offline).I also want a feature of taking a backup of DB and Store it on Cloud when the user is connected to the Internet.
Please Show me the correct path.
I also find some solutions like SQLite but is it work for Windows 10 PC Software? Are there any other solutions like MySQL?
A have created a database and table using SQL server object explorer in visual studio-2017, but I don't know how to connect it with my xaml and c# files.
I want to create a Windows 10 application and to have a local database to the Computer itself. I don't want any online database like Azure.
If you want to create a local database for your UWP application. you could refer to SQLite databases official documentation. And here is code sample.
A have created a database and table using SQL server object explorer in visual studio-2017, but I don't know how to connect it with my xaml and c# files.
If you want to connect a SQL server database, you could refer to How to access data from SQL Server database in Windows Store app. And it has video tutorial.

Hosting ASP.NET Web site using IIS7 Windows 7

I have made a small ASP.NET web site using VB 2010 and SQL 2008.
But I don't know how to host it on local PC.
The target PC is running windows 8.
All other PC's are connected it through LAN
The system is offline.
But before trying to host my web site on target PC (Windows 8) i want to make sure everything is ok with my site.
Hence I am first trying to host it on my PC (Windows 7).
I don't know anything about hosting on Windows 8 OS.
But I tried little bit on Windows 7 OS.
All I know is I am going to host my site on IIS7.
I already enabled IIS7 on my PC (Windows 7).
And I pasted all contents in my project folder to C:\inetpub\wwwroot
My default page is C:\inetpub\wwwroot\index.aspx
Now how do I add my website to IIS7 and attach database to it.
Do I need to install VB 2010 and SQL 2008 on target PC (Windows 8)?
Thank you.
Where is the database supposed to live in the end? If it is on the Target PC then yes it will need SQL 2008 but not if there is another server that is going to be the database server. You aren't clear about whether the site is supposed to all run on one server or if you have a multi-server set up where there is a web server and a separate database server.
Which version of the .Net Framework does the site use and is that registered with IIS?
Those would be my initial questions as you shouldn't have to install VB 2010 but you would need the Framework to be installed and configured to have this work.
EDIT: You will have to install and configure SQL Server 2008 on the machine. IIS can use .Net 2.0 or 4.0 and thus be aware of what configuration you want to run so that you don't wind up having issues.

PowerBuilder 12.5.1 and Windows 8 incompatibilities?

I have a PowerBuilder 12.5.1 application developed on Windows 7 64-bit.
I would like to have it running on Windows 8.1 64-bit, connecting to Microsoft SQL Server 2008r2.
The application starts, display initial window with lots of textboxes/checkboxes/etc and can even access the database from PowerScript and read the output of a query into a variable.
But when the application tries to open a window containing a datawindow, then it crashes.
What am I doing wrong?

How can I copy Dll's to Program Files folder in Windows 2008 Server using C#

We already have a C# application for Deploying Dll's to different environments(DEV/QA/PROD). This application when asked copies the required Dll's to Program Files folder. This was working fine in Windows 2003 server. But now we migrated our server environments to Windows Server 2008 which brings UAC into picture.
Now when we try to copy the Dll's from local desktop to Server Program files using our application the application is failing.
Can any one suggest me what is the C# code that can make my application to elevate it privileges which allows me to copy the Dll's to remote server.
Regards
Masthan
Add an application assembly manifest that includes requestedExecutionLevel of requireAdministrator.
That way your update program will be run as an administrator.
You could also change your installer to give all users Full Control to your application folder; that way any user could modify your application.

Resources