VFP 9 FrontEnd Application with Oracle 10g Express BackEnd - sql

I have a VFP 9 application that make invoices, it works fine with its default database(.DBC) I am trying to port the front end of the application (EXE) to be used with Oracle 10g Express as back-end through ODBC or any other suitable method. I do have the complete project source-code.
The application has two style forms single record editing forms, and master detail forms these forms just adds/edit/delete Search.
This application was not developed by me. I am required to keep it as it is. I do keep regular backups but its database files (.DBF) get corrupted after any OS / Power failure. So i am thinking to transport all the data to oracle database and want it to be edited / added with existing VFP EXE with data in oracle. and get rid of DBF crashes.
my problem in this scenario is:
1) I can connect to DB with ODBC. have all data from DBFs to Oracle Database but have problem with view/edit/issues it won't work as normal.
2) I am not able to use VFP Wizard to generate Data Entry form with ORACLE REMOTE VIEW. that can view / add/ edit data
3) Can not find any way to change database Source in VFP database designer to replace tables with oracle remote views VIA ODBC.
Thank you in advance. any help suggestion or guideline is welcome and much appreciated.
Regards.

Unless the application was designed to deal with a remote data source, rewriting it to talk to Oracle is probably a large job. Before you do that, have you considered simply adding uninterruptible power supplies (UPS) to each computer involved. Data corruption in VFP is generally due to interruption; providing a way for users to shut down properly when power fails may solve your problems.

Related

Deploying a Windows Form App in C# for multiple users with SQL Server. Alternatives for databases?

I'm working on a database driven program in Visual Studio 2015, in C#, Windows Form Application, and I'm using SQL Server 2014 for my databases, downloaded the most recent version from the MSDN site.
I've got it working well. But if I want other users on other computers and different versions of Windows, this would require them to have SQL Server installed, correct?
Basically the app is used for storing current medications, moods, a mood quiz, symptoms, etc.. and I store all the results in SQL Server databases. They can be edited, deleted, etc through the program's GUI. Do the users need SQL Server installed to use this app?
If so, is there an alternative to keeping databases without having to have the SQL Server connections, or is there a way to do this without the users having to have SQL Server installed? I don't want remote connections to me, I want it standalone.
Does this make any sense? If not, I can explain more. I know way back in the days of Visual Basic 4 I was making, reading and writing databases without SQL. But that was 16 years ago. So I'm wondering what the easiest solution to this is. Thanks!
In other words, you want a database that you can a) distribute to end users freely and b) that will 'connect' just to the copy of the database they have stored locally.
Here are a few options ---
SQLite over ODBC is as-easy-to-use as MSSQL, the driver can be found here:
SQLite ODBC
Use ConfigurationManager.OpenExeConfiguration to read / write your app config .xml file and use it as a key / value store. I can provide examples if needed.
Dynamically create an Access database, it should work as well as MSSQL for most things, with less overhead. Here's how:
Create an Access Database
Use SQLIte DLL. Details on SO
create-sqlite-database-and-table

What are my options - sql express or?

I have a client who has a VB 6.0 application with MS Access as backend. But, now the Access is unable to take the load. So, we are now considering to shift to SqlExpress Edition. Also, we will convert VB6.0 application to c# based Winforms. My questions -
1) Can SqlserverExpress support 10 users concurrently? If not SqlExpress, then what other options are available?
2) Should I first convert VB 6.0 to C# application? Because, if I transfer data to Sqlserver, will VB 6.0 application continue to work?
thanks
Yes it can
You don't need to convert your app, but Access and Sql Express - are different database engines, so you will need to adopt your app to sql express
Note, that sql express prior to 2008 R2 can handle up to 4 Gb databases, while 2008 R2 can handle up to 10 Gb per database.
1) SQL Express allows over 32 thousand simultaneous users. The only real limit is database size, which is 10 Gigabytes.
2) You'll need to at least modify the VB 6 application to have the correct connection string before it will work with SQL server.
I am curious though why you say that Access (the JET database engine) is unable to take the load. Usually 20 or even more simultaneous users are no problem.
If product is for in house use and doesnt generate cash you can use oracle. Its free to use unless your app is for commercial use.
One question to ask is after how many users does the system slow down? And if it is slow with one user, then this might be some software design issue and not necessary the "load" on the server. There also the issue of the type of connection WAN or LAN. In fact you can read about this issue in the following article:
http://www.kallal.ca//Wan/Wans.html
The above in a nutshell explains why the Access data engine does not work well on a WAN.
Also migration of data to SQL server without determining what particular issue is causing the slowdown could very well result in a further slowdown. In other words often just up-sizing data to a server database engine will not solve performance issues and in some cases it can become worse.
In fact in many on line Access forums we often see users complain of a slowdown when moving the back end data file from Access to SQL server. So just moving to SQL server without taking advantages of SQL server features does not always guarantee a performance boost.
The other issue you want to determine here is if the VB6 program uses ADO or DAO. Either data object model is fine, but ADO would suggest LESS code will have to be modified then if the application is based on DAO.
Another issue is you not mentioned how large tables are, and the number. So say 30 to 50 highly related tables, and say a small number of rows (say 200,000) in some of the tables should run just fine with 5 to 15 users. If your user count is only about 10, and your table row counts are small as noted then performance should be ok, and if it is not, then as noted you might be able to keep the application as is and moving the data to SQL server may not yield performance gains without further code modifications. And of course SOME code will have to be modified to work with SQL server - how much will depend on the data object used, and how much code there is over all. (more recordset code = more chance of needing more code changes).
If you do decide to convert from Access to SQL Server Express, there is a migration wizard which can give you a quick start with that process. Here's the link

Offline database solution for sql server

Here's task: We have an sql server database. which is hosted at our server. What we need to do is: we need to create a non-techy-users interface (basically insert/edit forms) and let these non-techy-users to install this database locally, since they are located in the areas without internet connection. Then when they're done using the database we get the data from them and inster it in our database.
The biggest concern is that it is not trivial for non-it people to install sql server. Can you please advise me what solution should I choose? Simple Access should work fine, but i really do not want to mess with it and have data conversion back and forth between engines.
Sync Framework for SQL Server: your application uses a lite weight, embedded SQL Server CE (no installation, just a couple of DLLs deployed along with your app) and the sync framework manages the synchronization with the 'mother ship' SQL Server.
Out of interest, why do they need their own installation? Can't you create a new database on your existing instance?
If you're looking for an easy way to create insert/edit forms on your database, have you considered looking at Microsoft's new LightSwitch product (currently in Beta) or Microsoft's Dynamic Data?

Change of code if Database is changed (form Access to SQL Server)

I am trying to migrate from Access Database to SQL server database. Do I need to make changes (for saving, reading, deleting etc. data) to my code as well?
I understand I need to change connection but what about code?
Thanks
Furqan
For the most part, Access SQL Queries are very similar to SQL Server Queries. Therefore, unless you're using Access-specific constructs such as Val, CInt, etc in your queries, you can safely migrate to SQL Server.
It is recommended though, that you thoroughly test the program after migration lest you run into 'strange' errors.
I'm sure the conversion will require some time and troubleshooting. For one, Access through version 2007 uses VBA for the back-end code and SQL Server's programming is quite different from VBA. Developer's transitioning from Visual Basic 6 (very similar to VBA) to VB.NET ran into quite a few challenges.
Also, keep in mind that SQL Server is best used as the back-end storage engine. The user interface is typically written in a .NET language using Visual Studio. SQL Server (at least through 2005 -- I haven't used 2008) doesn't have user interface components like a File Open dialog box.

Automatically Generate SQL from existing MS Access table

I've just designed a large database by playing around in MS Access. Now that I'm happy with the design, I need to be able to generate this same database (tables, relationships, etc.) from code.
Rather than hand-writing the SQL CREATE statements (which will be long, tedious, and error-prone process), I was wondering whether there was a shortcut. I seem to recall from my limited exposure to MySql that I was able to export an entire database as an SQL statement that can then be run in order to regenerate that database.
Do you know of a way to do this in MS Access, either through the GUI, or programmatically?
I just found and tried out this tool: jet-tool. It seems to work well for Access 2010.
For free for 30 days (then $30) you can give DBWScript a go, looks like its what you are asking for, although not in native Access GUI or programmatically
The quick and dirty, easy, perfectly legitimate way to do this is just copy the .mdb file. Empty out the data if you need to - usually there are static tables that are handy to leave populated, however.
I use a free utility called MDB Viewer Plus (http://www.alexnolan.net/software/mdb_viewer_plus.htm).
Launch it, open your db, then select your table.
On top menu, select "Table > Generate SQL - CREATE".
I don't know what tools you have on your development machine, so this may or may not be helpful.
You can easily transfer your Access database to Microsoft SQL Server using the Upsizing Wizard.
The express edition of SQL Server is available for free > here.
You will also want to get the free Management Studio Express.
Using these free graphical-based tools you can easily generate the SQL statements to re-create the database. You will have the Create statements you are looking for and they will be placed in a text file.
The Bullzip is very good to this. Very simple. See bullzip Access to MySQL for example
It is possible export any tables to SQL or migrate automatically.
Access to MySQL is a small program that will convert Microsoft Access Databases to MySQL.
Wizard interface.
Transfer data directly from one server to another.
Create a dump file.
Select tables to transfer.
Select fields to transfer.
Transfer password protected databases.
Supports both shared security and user-level security.
Optional transfer of indexes.
Optional transfer of records.
Optional transfer of default values in field definitions.
Identifies and transfers auto number field types.
Command line interface.
Easy install, uninstall and upgrade.
The thing that you're mentioning in MySQL is sql dumping. Very useful feature. If you want to migrate the database to mysql, here's a helpful article.
http://www.kitebird.com/articles/access-migrate.html#TOC_4
I have been using for years a tool called database.net from https://fishcodelib.com/Database.htm
I generally use it on client's site as a portable version of SSMS (drop and run), but it can handle a multitude of RDBMSes, including Access.
Connect to your mdb/accdb, right click any table, choose SCRIPT AS, Create, and you're done.
If you right click Tables header, you can select multiple tables to generate, but I think it's a feature of the paid version.
I have no acquaintance with them, just a happy client.
I found an easy way to go:
Export-> ODBC Database
and then retrieve the SQL form there (e.g via pgadmin on postgres)
Compare'Em
http://home.gci.net/~mike-noel/CompareEM-LITE/CompareEM.htm
The free version creates VBA while the $10 pro version gives you DDL statements.