Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
First time user of SQLCONNECT()
Message
From
11/06/2003 07:22:23
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
11/06/2003 05:14:04
Edward See
Magicalogic Consultancy System
Quezon, Philippines
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00798746
Message ID:
00798809
Views:
22
Sorry I don't know. I never use SQLConnect :(
Cetin

>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform