Highlighted
Valued Contributor.
Valued Contributor.
312 views

test DB requests

Hello,

I want to test a DB request, and use as connection Url in the form: jdbc:oracle:thin:@server:port/folder 

with a login and a password

how can I use the lr_db_connect  function ? what should I put in:

  • ConnectionString=Data Source=
  • ConnectionType=

how do I specify the login/password in lr_db_connect 

what are the different possibilities ?

 

 

 

0 Likes
3 Replies
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: test DB requests

Hi Fred,

When you want to use the lr_db_connect() function, you are working from a C-based script. Just type in the function name in the script editor of VuGen, put the cursor on the function and press F1 to get the help. Check out the examples. Note their is a wizard to fill in all parameters for a database connection.

You will note that one of the arguments is 'ConnectionType'. JDBC is not listed as one of the connection types. I guess you need to install additional software to be able to make a connection to oracle (client libraries).

When you use a Java language based script, you can put all the needed jdbc jar files in your class path and program your database access layer as usual.

Success, Erik

Signature:
Reward community members who take time to respond and help.
0 Likes
Highlighted
Valued Contributor.
Valued Contributor.

Re: test DB requests

Hi,

thanks for your answer, but if I have the server name, the port and login/pwd can I user lr_db_connect() without using the jdbc Java class ? (for example with ODBC, or ORACLE as connection type ?)

0 Likes
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: test DB requests

Please consult the function help of lr_db_connect(). It points to the Add Step Dialog. You can fill in your connection information and can test the connection to your database.

I think that only for Java there are type-4 JDBC connectors (so no native installation). When using C scripting you need to install oracle client libraries as well before you can use ODBC or ORCLE type of connection.

Next to the four items you mentioned you need to know the database or the service-name (oracle listner) to connect to as well.

Signature:
Reward community members who take time to respond and help.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.