dbf slow connection over network - vb.net

I'm working on a visual studio 2012 project which using vb.net.
In the project, the program need to link back (using oledb) to an old school .DBF database.
During development stage, which the db allocated in localhost, everything work fine.
Now, when implementing the program, which the database is sit in a server the connection become horribly slow.
All the clients who using the program facing the same problem when opening the program or retrieve data from the database.
Example,
Opening an Employee List Table, around 20 records with 2 columns.
Local : took around 1 second to load.
Over Network : took more than 5 minutes to load.
Anyone here facing the same problem before and any solution that may overcome this ?
Thanks in advance for your help.

I've been working on a similar application recently and I found that hosting DBF files from anything other than a windows server 2003 server showed similar SLOW results as to what you are describing... Something about how that server version serves files(I think it's related to opportunistic locking somehow) allows the client machines to receive the DBF data at a rate closer to what you were seeing at the development stage.
Overall I think doing anything other than allowing an DBF files for import to another type of database type (ie SQL ).. is a waste of time nowadays... DBF files are terrible and as you are learning don't serve well anymore anyway. Go XML or SQL or both! :)

Related

UnixODBC driver issues for .MDF databases. OR: is there a way to easily extract a bunch of tables without an sql server?

Disclaimer: I am somewhat of a n00b when it comes to database programming, so bear with me.
I've been attempting to batch process a rather large amount (~20 gb) of data all contained in .MDF SQL database files. The files contain meteorological data obtained through weather balloons, with each table consisting of ~1 second observations of winds, pressure, height, temps, etc, and are created with our radiosonde tracking software on an unnetworked Windows machine. It is possible (and quite easy) to load the files using the associated software and export the tables as an ASCII text file...however, this process involves manually loading each one. As I'm performing a study that requires as many soundings as possible (we have over 2000), doing this process over and over for several years of twice-daily observations is extremely time-prohibitive.
I've been taking the files off of the computer and putting them on my laptop running Linux Mint, and consider myself to be fluent with Perl...I do most of my data analysis with Perl scripts. That said, I've had the darndest time trying to get into the database files!
I've tried to connect to one of the files using the DBI package using variants on
$dbh = DBI->connect("DBI:ODBC:$filename") or die "blahblahblah";
I have unixODBC installed and configured, have downloaded "libmyodbc.so" and "libodbcmyS.so", and keep getting the error
DBI connect('','',...) failed: [unixODBC][Driver Manager]Data source name not found, and no default driver specified (SQL-IM002) at dumpsql.pl line 6.
I've tried remedying this a number of ways over the past couple days, and I won't post them here for the sake of brevity. My odbcinst.ini file is as follows:
[MySQL]
Description = ODBC for MySQL
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so
Setup = /usr/sib/x86_64-linux-gnu/odbc/libodbcmyS.so
FileUsage = 1
I'm seriously confused. I THINK I'm doing everything that various online tutorials are suggesting, but everyone else is connecting to servers and these files are all local and in the same directory! Could anyone attempt to point me in the right direction? All I want is to calculate meteorological values using vertical sounding data! Am I missing something totally obvious?
Any help would be greatly appreciated!
It seems the original database server was a Microsoft SQL Server (MDF files). I am afraid these files alone are useless on a Linux machine. You need a Microsoft SQL Server on a Windows machine to get access to the contained data.
You described that you are able to attach a MDF file on a SQL server manually and then you can export the needed data as text files. Try to automate that. I'm not a MS SQL Server expert but it should be possible.
E.g. here is a tutorial to attach and detach a MDF file via T-SQL. So my approach would be to write a script which iterates over the 2000 MDF files and attach each to the SQL server. Then execute a query to export your data and then detach the MDF.

VFP 9 FrontEnd Application with Oracle 10g Express BackEnd

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.

Light database server options for a small business application

Hi there and many thanks in advance, Im veeery newby.
I am building a small visual basic 2010 application and I need a better choice for my database (around 20 tables), since now Im using SQL server express 2008 and as far as I understand it is too big and complicated for me (just installing it was a pain for me)
I am looking for an application that will be easy to distribute (maybe just an installer and thats it!) and that can run without problems on old computers with windows xp.
The last thing is that I want to have to chance to install just a client version of my app on a computer and tell it to connect to the database wich will be running on other computer on the same LAN (or maybe on a web server on the future!).
In other words I would like to have the option of selecting "where" is the database to read/write on.
I will thank advices for this implemtation and will respond if somebody needs more details before answering.
Well installing sqlserver in not rocketscience al you need to execute .exe .
Though if you looking for opensource database then have a look at mongodb
MySql is open source and quite easy to use, especially with a tool like PHP MyAdmin:
http://www.mysql.com/

How can I make a SQL database, and use it in VB2010 (having more than 1 computer accessing the database)

The background to my problem is based on distributed computing. I want to have a database with some numbers in them and then a number of computers go through each row calculating another number (a little bit of an over simplification).
The problems I'm having are routed in my poor understanding of SQL servers (I think). I've got Microsoft SQL server 2012 (and 2008) installed on this machine and I've somehow managed to make a server for this task but then the problems arise.
I can't add a table to the server (I'm trying to do this in VS2010). When I expand the server and right click on tables and select add new table i get the following error:
"The server version is not supported. Only servers up to Microsoft SQL Server 2008 are supported."
That stops me making a table and from there I can't move on. I've downloaded and installed the VS2010 SP1 (and re-installed it again when it didn't fix the problem) as I found this suggested for similar issues.
Any help on this would be greatly appreciated. I've read around but nothing seems to work, people suggest using "SQL Management Studio" but I don't seem to have this installed!
Also, I haven't gotten to this step yet, but if this gets fixed any advice/links on how to access the database from a different machine (over the same local network) would be greatly appreciated!
Many thanks,
Fraser
R Harvey gave you the pointer to SSMS - that's the ideal tool to use.
As for other computers accessing your local database - the name of your computer (where MSSQL is installed) is the name of the server in your connection string.

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