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

Creating DSN from Fox

Status
Not open for further replies.

dellyjm

Programmer
Apr 13, 2000
168
JM
How do I create a DSN from within code using Visual Fox?

Delton.
 
See the FAQ: faq184-65

Basically, you'll use SQLStringConnect to pass the entire connection string. The various elements that you'll pass within the string (many are optional) depends on what ODBC driver (hence, what data source) you are using. Robert Bradley
Support operation moo!
Visit the OpCow page to help in this cause
 
Thanks, but what i need to know is how to go through the ODBC Datasource with Control Panel and create one from there.

Delton.
 
the following code with take the alias tmp
(Make sure you are at the top of the table)
copy to the clipboard(datatoclip), open excel
and paste it into a spreadsheet

select tmp
goto top
_vfp.DataToClip("tmp",reccount(),3)

* copy to (ofile) type xl5
oexcel=createobject("Excel.application")
oWorkbook = oExcel.Workbooks.Add()
oBook = oExcel.Workbooks.Add()
oExcel.Visible = .T.
oBook.Sheets[1].paste()

how this works
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top