How to query SqlBase server name?

Discussion forum about all things SqlBase.
User avatar
Charlie
Canada
Posts: 594
Joined: 07 Mar 2017, 18:52
Location: Fredericton, New Brunswick, Canada

How to query SqlBase server name?

Post by Charlie » 02 Sep 2021, 21:09

Hello,

Pardon the question if it is a silly one! (My experience is with Oracle db.)

I've got a GTD 6.3 application connecting to a SQLBase 9 database, and I'm what kind of SQL statement I can SqlPrepareAndExecute to get the db server name of the database to which I'm connected.

Can somebody help this old dog learn a new trick?

Cheers and best regards !

User avatar
Steve Leighton
Site Admin
Site Admin
New Zealand
Posts: 274
Joined: 05 Mar 2017, 20:57
Location: Tauranga, New Zealand <--> Stroud, England

Re: How to query SqlBase server name?

Post by Steve Leighton » 02 Sep 2021, 22:24

.
Charlie
Check out "SQLBase.h" in your SQLBase folder for the hundreds of parameter options you can pass to SqlGetParameterAll().
In the case of Server name use:

Code: Select all

Call SqlGetParameterAll ( hSql, 1024, rnNumber, rsString, FALSE  )
The Server name ( parameter 1024 ) is returned into rsString .
Keep up the great SQLBase work !
p.s. Move from v9 to v12.2 - you'll be less of an "old dog" as you call it.
Greetings from New Zealand
Steve Leighton

Bankside Systems Ltd.
UK ♦ Australia ♦ New Zealand

www.banksidesystems.co.uk

Image

User avatar
Charlie
Canada
Posts: 594
Joined: 07 Mar 2017, 18:52
Location: Fredericton, New Brunswick, Canada

Re: How to query SqlBase server name?

Post by Charlie » 03 Sep 2021, 12:57

Steve, you sweet fountain of knowledge.

And a master of digestible knowledge presentation to boot.

(The least I can do is gush of flattery. )

Thank-you buckets. I can't wait to try that out.

Cheers !

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 0 guests