PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
WINDEV 2024
→
Finding the current connection for a file/table
Finding the current connection for a file/table
Started by Pascal Scheffers, Jul., 01 2004 3:08 PM - 4 replies
Connect yourself…
Pascal Scheffers
#1
Posted on July, 01 2004 - 3:08 PM
I am trying to figure out if a file is a .FIC or a MySQL or other database at runtime. Is there a function to do this? I have found HDescribeConnection, but that only seems to set/create a new connection.
- Pascal.
Report
0
0
John Marrone
#2
Posted on July, 01 2004 - 3:19 PM
Pascal
Have you tried HFileExist(filename). Check for fic, then if not exist you have a MySQL file.
John Marrone
I am trying to figure out if a file is a .FIC or a MySQL or other database at runtime. Is there a function to do this? I have found HDescribeConnection, but that only seems to set/create a new connection.
- Pascal.
Report
0
0
Raimund Schuldhaus
#3
Posted on July, 01 2004 - 5:12 PM
Hi Pascal,
try YourFile..Connection
HTH
Raimund
I am trying to figure out if a file is a .FIC or a MySQL or other database at runtime. Is there a function to do this? I have found HDescribeConnection, but that only seems to set/create a new connection.
- Pascal.
http://www.invitec.com
Report
0
0
paulo oliveira
#4
Posted on July, 01 2004 - 9:29 PM
And use :
HListConnection(hLstDetail+hLstAll+hLstSorted)
to know the properties of the connection.
Raimund Schuldhaus <rschuldhaus@invitec.com> wrote:
Hi Pascal,
try YourFile..Connection
HTH
Raimund
I am trying to figure out if a file is a .FIC or a MySQL or other database
at runtime.
>Is there a function to do this? I have found HDescribeConnection, but that
only seems
to set/create a new connection.
- Pascal.
http://www.invitec.com
Report
0
0
Peter Holemans
#5
Posted on July, 01 2004 - 11:06 PM
Hi Pascal,
The '..type' attribute of your file or query should do it.
Here's an example (HFNormal is HyperFile 7):
SWITCH QRY_SELECT_PRODUCT_BY_ID..Type
CASE hFileHF5:
gNumEnr=HRecNum(QRY_SELECT_PRODUCT_BY_ID)
CASE hFileNormal:
gNumEnr=HRecNum(QRY_SELECT_PRODUCT_BY_ID)
CASE hFileQuery:
gNumEnr = HSavePosition(QRY_SELECT_PRODUCT_BY_ID)
OTHER CASE :
gNumEnr=HSavePosition(QRY_SELECT_PRODUCT_BY_ID)
END
Regards,
Peter
http://members.chello.be/cr45693/
Report
0
0
→ Go back to WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (earlier versions)
Français
English
Español
Portuguesa
Close this window
Search type
Only topics
All the messages
Search period
Any time
Past hour
Past 24 hours
Past week
Past month
Past year
Cancel
Preview of your message
Adding an image
Import an image from a URL
Send an image from a file of your disk
Drop a file or click "Browse..."
or
Cancel
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Text