Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

client/server app without SQL server 3

Status
Not open for further replies.

ultimatewilliam

Programmer
Oct 16, 2002
57
0
0
SG
hi! its been a long time..

1) i want to learn building client/server app. but i dont have sql server for testing.. can i use the native vfp database? do i have to create a DSN to connect?

2) i noticed that in vfp, a DSN is required to connect to sql server. given the location of the sql server, there must be a way to programaticaly create DSN on client machines - for deployment purposes. is this possible?

thanks all!
 
You could download and install SQL Sever Express. It is free. But my recomendation is to buy Developer edition. It costs about 49.95$

DSN is not recuired, check SQLSTRINGCONNECT() in HELP or use CursorAdapters which allows you to use ADO and/or ODBC.

Borislav Borissov
VFP9 SP1, SQL Server 2000/2005.
 

Hi Ultimatewilliam,

I would definitely endorse Borislav's recommendation: Buy SQL Server Developer. It's not expensive, and has all the features of the full SQL Server, which makes it ideal for learning.

SQL Server Express is free, but it's not a good learning tool. It's not even much good for development. Its main use is as a runtime version, which can be distributed with your apps to users who don't have the full product installed.

Re creating DSNs ... There are several ways of dealing with this issue. See thread184-1250410 for some ideas. But I wouldn't get too hung up on it for the moment. You can start learning before you need to worry about distributing DSNs,

I'd also suggest that you don't go down the ADO route unless you are already fully comfortable with ADO. I'ts just another layer of complexity. Learn the basics first, and come back to ADO if you really feel the need.

Hope this helps.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
thank you all for a quick response. just want to share my database programming experience. i actually started using foxpro26win and fortunately have made a lot of apps using that. im very sure you know how it is to create such programs in foxpro26. its like a batch file meeting a particular goal. Then came vb6 and Crytal Reports 85 into my life. very confusing at first because im still trying to relate the traditional approach. Help files and books helped but nothing compares with the help i get through forums like this. Answers are direct. Somehow i was able to create systems using vb6 as front end but still foxpro tables as back-end. i once also used vfp6 databse for back end but still treated those data as tables in foxpro26. i also tried msaccess database for a small company, and they are all very glad. Their business is moving smoothly. That's why i could say that im 60% quite familiar with ADO that you mentioned. Those connection objects, recordsets, command objects, sql statements and many others, gathered all together and fortunately able to build couple of full blown system for the company im working with. if you would notice ive been a member here for quite some time, those were the times that im coding those system, and this forum help a lot when im almost helpless. For a couple of years, I left foxpro26 and concentrated on my dynamic trio: vb6 + cr85 + foxpro tables.

the question i keep asking myself, yes i can build a database system, but am i doing it in client/server way? the programming style that i've been hearing of for so many years now. Should i be a rich man to buy an SQL server and use it as backend database, then thats the only time to prove myself that im into client/server? or should i just look for a company who has SQL server in their room and thats the opportunity for free testing? did i switch to vb6 and cr85 just to let my friends know that im into more advanced development tools and just dont want to be left behind? well.. i think i am.

then i left my company. left my programs with them. im in a new one now and this time i came across a big database system written in VFP80. i examined the code. some are not familiar like "define class.." because i only know of "define window.." :) Now im going back to where it all began, but this time its VFP already. I press F1 then i saw the topic "VFP as an application front end". so i can treat vfp like vb6? just connect, connect and connect? Help also says VFP is good for client/server - this method is really following me. my thinking.. foxpro is fast. but if i do it in client/server way, its much even faster. thats why im very much interested? all i know is that, as long as im not using stored procedures, its not client/server yet. hmm.. VFP database can have stored proc right? can i start with that? Client/Server - if im done with this, .NET, XML and ASP sounds interesting..

All the things i say here is very much open for any reactions or comments. please fell free to correct my insights if you think they are wrong. thats the only way for me to mature in this field. helpful people like you deserve all those stars!
 
Ultimatewilliam,
You're making a few assumptions here that I think you need to consider... you do not need SQL Server to be Client/Server. Nor dose having "Stored Procedures" "Define" your applicaiton as client/server... You have two opportunities to control the data within your application. Fundamentally, there are only 2 reasons to use SQL Server over native VFP:

1) You need security at the table/database level that Fox can not provide.
2) You have tables/indexes/Memo that you expect to exceed the 2gb limitation that VFP has for max file size. (Though there are was of working with this too...)

The advantage is: Free distribution, no additional costs to your customer base, and much simpiler administration. If your clients are small to medium sized companies, VFP will likely do you just fine. Couple it with field level encryption routines for sensetive fields, and you have a very robust solution, actually...

That said, there are some great advantages to SQL Server, and if you are careful about how you build/plan your application, it can be easily "upscaled" to SQL Server later as well. This is not as hard a you might think either, and a single front-end application can be made to accomodate either data source as a back end...

So, you should choose based on best fit for your needs. Remember, don't throw out your screwdriver simply because someone invents a drill...



Best Regards,
Scott

"Everything should be made as simple as possible, and no simpler."[hammer]
 
UltimateWilliam,

Further to what Scott gave you, you are going to have two learning curves that you need to work through. The first deals with Object Oriented Programming (OOP) and the second deals with a client/server or "N Tier" construct.

After FPW 2.6 came VFP 3 - that is where the Fox world changed dramatically. OOP came into our beloved Fox and we have never looked back.

The second learning curve you need to deal with is the "N Tier" concept. A basic client/server app has three tiers: UI Tier or "Front End"; MiddleWare or Business Rules Tier; and Database Tier or "Back End." In a client server app, each of these tiers could exist on different computers (they don't really have to) as they are each "standalone" apps.

As Scott told you, you can have a purely VFP client server app - but you could just as easily have a web-based front end (this would make it a 4 tier app as it would need a web server tier) using HTML, what ever, a middle tier using the beloved Fox, and a database tier that could use an Access database, an oracle database, a SQL database, a VFP database or even a MySQL database. If you do it right, you should be able to seamlessly upgrade from a MySQL or a VFP (or what ever) database to a SQL database and the users should never know that it happened. Each tier is totally seperate from the others.

Andy Kramek has a good article on class based data management here:
Ken
 
Should i be a rich man to buy an SQL server and use it as backend database, then thats the only time to prove myself that im into client/server?
Just so that you can see how it could be done with VFP only, read A poor man's database server and A FoxPro Server articles.

Also, you may want to take a look at VFPServer, which I didn't try because I will possible get Web Connection; I am trying the shareware version, and looks like it will do what I need (and much more). Good luck.
 
Thank you all so much for sharing. im sure you could visualize what kind of programmer i am. dbase3+,clipper,foxbase,foxpro26 dos/win <- all these these tools which i have learned from school dealing with structural programming still linger in my mind. The tools that i used when i started working for more than 10 years like in prison. Except for being fortunate to learn vb6 which i have discovered all by myself.

I guess theres no more option left for me except to adapt to the current programming concepts and move on. Thats why i deeply rely on the internet for knowledge that would enrich myself for free. Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top