Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing Constants using OLE
Message
From
28/10/2004 11:50:24
 
 
To
28/10/2004 11:18:21
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00955318
Message ID:
00955336
Views:
17
It's simply a value. Just pass the value of the constant.

A constant is defined at compile time. So, if you have
#DEFINE MyConstant ["Eat at Joe's"]

? MyConstant
When you compile, everywhere you use MyConstant in the application will be replaced with "Eat at Joe's". The runtime will know nothing about MyConstant, as it doesn't exist in the compiled code.


>Hello,
>
>The MS Access TransferText method's first parameter is a constant (acExportDelim).
>How can I pass this constant to Access in my code?
>As written below Foxpro thinks acExportDelim is a variable.
>If I try to pass it as text Access rejects it.
>Please Help...
>
>
>Openmdb = "C:\DATA_TEST\10_SHOP.mdb"
>
>oleApp = CREATEOBJECT("Access.Application")
>oleApp.Visible = .T.
>oleApp.OpenCurrentDatabase(Openmdb, .T.)
>oleApp.DoCmd.TransferText(acExportDelim, "", "Customer", "C:\DATA_TEST\TestCustomer.txt")
>
>
>
>Thank you very much,
>Gaylen Miller
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform