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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP-SQL Installshield question

Status
Not open for further replies.

jrajesh

Programmer
Aug 12, 2001
72
HK
I've created a VFP 8.0 app. with the database in SQL Server.
I'm running SQL Server 8.0 and the client will be using the MSDE (less than 5 users on the client).

I suppose I can just copy the mdf and ldf files as well as the .dbc, .dcx and .dct (containing the views) to the relevant folder on the client pc using the installshield routine.

Please advise on what I need to do in installshield to create the ODBC configuration on the client PC.


TIA,
Regards,
Rajesh
 
Rajesh,

I suppose I can just copy the mdf and ldf files as well as the .dbc, .dcx and .dct (containing the views) to the relevant folder on the client pc using the installshield routine.

I doubt it. I would think the database needs to be "attached" to the server on the user's system. There's a stored procedure which will do that for you. You would need to install MSDE, then run that stored pocedure from your client application.

But I might be wrong. Why don't you just try copying the MDF and LDF and see if it works.

Mike


Mike Lewis
Edinburgh, Scotland

My Visual Foxpro web site: My Crystal Reports web site:
 
Mike,
Thanks for your reply.
Could you please name the stored procedure that will 'attach' the database the server?
Is it something that we should script or is it one of the procedures inherent in SQL Server?
Sorry if I'm sounding dumb. But, I'm pretty new to SQL-Server.
Thanks again and regards,
Rajesh
 
Rajesh,

The stored procedure is called sp_attach_db. You don't need to script it yourself. Just call it from your VFP code.

You'll also need to "detach" the database from the existing server, which you do with sp_detach_db. The Help file has more information, or look at the article at:

Mike


Mike Lewis
Edinburgh, Scotland

My Visual Foxpro web site: My Crystal Reports web site:
 
It depending on the version of InstallShield to what SQL Server features you have available. If you are using Express, the only feature you have is setting up ODBC DSNs and this is not perfect. Some of the more costly versions will run scripts.

Like Mike has noted, you can attach the database. If you are looking for a tool which replicates the Enterprise Manager functionality for MSDE, check out MSDE Manager from Vale software (
This package will give you the interface to set up backups, attach databases, and run scripts (like when you update the structures in the next release). It is powerful and relatively inexpensive.

You can also use oSQL which is a command line tool to access SQL Server. Painful, but free of cash costs.

_RAS
VFP MVP
 
Mike and _RAS,
Thanks for your advise.
I'll try them out and revert.
Regards,
Rajesh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top