- - Forum

Forum Navigation
You need to log in to create posts and topics.

-

-

Hi!
A Hyperlink is just a String, so there is not a specific field format to store hyperlinks.

Hello,

I can think of 2 reasons why you ask about a Hyperlink Format:

First a Validation for textentry if the text is a valid link. This might be done with other Tools like a regex.

Second is to make a textstring to a clickable link in the grid.

Are this the reasons why you ask?

Regards

root:

Note that the NeoDBPro plugin is just "a bridge to Databases that support ODBC"; I do not know of any popular databases that support a "link/URL field type".

However, with some script, you can make it appear (to your end user) that there is a field containing links i.e. if she/he (double) clicks on that field in a grid, the end result is that the associated web page is displayed in a WebBrowser object of your choosing.

Understand that a link has 3 components ...

- text e.g. "WXYZ Corporation"
- href e.g. "https://www.wxyz.com"
- target e.g. "_top"

1) Simple Simulation

a) setup a field named linkHref; this field will contain text like "https://www.wxyz.com"

b) in the dbpSetGridProperties command, define property OnDoubleClick=subroutineServiceDoubleClick

c) setup subroutineServiceDoubleClick something like this ...

:subroutineServiceDoubleClick
dbpGetActiveField "myDB" "myTable" "[SelectedField]"

If "[SelectedField]" "=" "linkHref"
  ... get contents of double clicked cell in grid
  SetVar "[selectedLinkHref]" "[myDB.myTable.linkHref]"
  ... now show this in WebBrowser
  BrowserGoTo "WebBrowser1" "[selectedLinkHref]"
EndIf

2) Better Simulation

a) in addition to linkHref, have a field named linkText; optionally, hide the column for linkHref (user double clicks on linkText instead)

b) same double-click subroutine as in 1 (a)

c) in your subroutine ...

subroutineServiceDoubleClick
dbpGetActiveField "myDB" "myTable" "[SelectedField]"

If "[SelectedField]" "=" "linkText"
 ... get contents of double clicked cell in grid
 SetVar "[selectedLinkHref]" "[myDB.myTable.linkHref]"
 ... now show this in WebBrowser
 BrowserGoTo "WebBrowser1" "[selectedLinkHref]"
EndIf

Hope this work around helps.

 

Open chat
1
Do you need more info?
Hi, do you have any doubt?