Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
First time user of SQLCONNECT()
Message
From
11/06/2003 05:14:04
Edward See
Magicalogic Consultancy System
Quezon, Philippines
 
 
To
11/06/2003 03:56:25
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00798746
Message ID:
00798792
Views:
23
Thanks Cetin, you have been most helpful in the past.

the following line still somehow makes the dbc visible

lcDBCFullpath = "\\servername\sharename\extrapath\testdata.dbc"

i was looking if possible where only the ODBC DNS name is used since it is already defined in the server.

by using SQLCONNECT('SERVER_DNS_NAME','','')

without recoursing to a SqlStringConnect() but only SqlConnect()

>>i have a Sample.DBC in W2K server.
>>ODBC is mapped to this. DNS name is 'Sample'
>>
>>code inside form.init() is :
>>
>>nConn = SQLCONNECT('Sample','','')
>>SQLEXEC(nConn,'SELECT * FROM customer','customercursor')
>>
>>the above works fine if form is compiled to exe and run from server.
>>
>>but if the same exe is run from a workstation ( directory of exe is mapped to a drive ) , nConn is error.
>>
>>what I am trying to do is running VFP exe but the data is hidden but accessed through server ODBC ?
>>
>>please guide me.
>>
>>thanks
>
>Use a connection string instead. ie:
>
>
>lcDBCFullpath = "\\servername\sharename\extrapath\testdata.dbc"
>lcConStr="DSN=Visual FoxPro Database;"+;
>    "SourceDB="+lcDBCFullpath+";"+;
>    "SourceType=DBC;Exclusive=No;BackgroundFetch=Yes;"+;
>    "Collate=Machine;"
>lnHandle = SQLStringConnect(lcConStr)
>SQLExec(lnHandle, "select * from customer","crsResult")
>SQLDisconnect(lnHandle)
>
>If you put the data on an NT server directory with 'list directory contents' disabled for users you can almost hide it. For further control you might use winapi to log a special user with RW rights instead of just blocking dir listing.
>Cetin
Use things, not people. Love people, not things
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform