Thursday, 22 April, 2004

Here's a problem that I solved yesterday. How do you fire a parameter query against Foxpro without using a stored procedure?

The answer is pretty simple but took alot of time to find as the syntax for foxpro is slightly different. You basic mark your parameters with ?'s.

e.g. Select Company from Contacts where Telephone=?

Then you'd use an ADO/ADO.NET command to slam a parameter against it. I dont think the name of the parameter matters but the orders does. If I have multiple parameters make sure you have the order of the parameters the same as the order of the question marks in the Sql String.

While I'm talking about FoxPro.. there's another niggle when you use a DataAdapter to fill a DataSet. The adapter makes the mistake of thinking fields that are of the type double are of the type decimal. Be sure when using your parameters to convert any of these stray decimal values to doubles.. Emoticon

My respect for the Foxpro engine has grown in recent weeks.. It's a much fuller application that I originally thought. That said, I still think Access is superior product for it's target market.

However, why people still bother with Access is beyond me. Yes, Programmers cost alot of money.. but say you have a 20 user Access application. Well Access 2003 costs £179.99 per shot. Just to get the software to run your application your looking at £3,600 - then you've got the development time on top of that.

Now, look at the alternative. The cheapest way you can obtain Sql Server is by exploiting the good deal you get for Microsoft's Small Business Server. You can obtain the software plus the 20-user lics for £1307.47. Now look what your getting for your cash. Your getting a Windows 2000 server, Microsoft Exchange, Sql Server, Shared Fax Server, Internet information server etc.

The downside is that Joe Average can't write an ASP.Net interface for the database. I retort with the fact that if your designing a new system then that system is probably going to last years. The simple answer is you don't want Jo Average writing your new system. They wont have the experience to do the job properly.

It's my opinion that you'd be saving money now to spend more later fixing the mess they made of the job. The simple answer is: Stop being scrouge and hire someone with the calibre to do the job properly. Once you've paid for that kind of skill.. the license cost becomes the crucial factor.

I recon there's alot of ill-concieved Access deployments out there. One such deployment I got wind of was a mobile phone reseller that had a terrible problems with their main system. If I remember correctly, it had around 20 users and used to corrupt fairly often.

Lesson 1: File based databases will corrupt.

Lesson 2: Your throwing your money away supporting a database that corrupts so often.

Lesson 3: Does anyone at Microsoft expect you to run your business on Access? Why do you think the bundle Sql Server with SBS?

Conclusion: Mission critical apps should not sit on flimsy file-based databases.

Simon

08:59:56 GMT | #Programming | Permalink
XML View Previous Posts