programming, vfp, visualbasic, sql

No.12339773 ViewReplyOriginalReport
hi internet people, i have for you something you love, a programming question.

im working on visual profox and i want to load the main database of a program with a variable (or something) for the path of it, here is my problem the command dont recognize variables for the path:

OPEN DATABASE "c:\program\db_main.dbc"

and i want to do it something like:

OPEN DATABASE cPath

where:

cPath = ALLTRIM(filetostr(c:\program\path.txt))

so... if you know vpf or a little programming i imagine you know what im trying to do, can anyone help me? @_@¬