mint
(Mintoo)
September 29, 2023, 11:02am
1
Hi ALL i am trying pass the data to establish connection with the Database
i have store all data in different variables like Hostname, UserId , password etc
when i tried to run that connect to database activity getting error data is not in correct string format.
any help will be great
mint
(Mintoo)
September 30, 2023, 6:27am
3
can you help me to modify this I tried getting error
@vinitha_yachamaneni
“USER ID=TestDATA;DATA SOURCE=”(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = Test)(PORT = 1234)))(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = minto.com )))“;PASSWORD=Passkey”
above is the string
below is the list of variable with value
USER ID=TestDATA
HOST = Test
PORT = 1234
SERVICE_NAME = minto.com
PASSWORD=Passkey
Anil_G
(Anil Gorthi)
September 30, 2023, 6:51am
4
@mint
Please show the actual connection string without variables
Then we can give you astring eith variables in it
Cheers
mint
(Mintoo)
September 30, 2023, 6:54am
5
“USER ID=TestDATA;DATA SOURCE=”(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = Test)(PORT = 1234)))(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = minto.com )))“;PASSWORD=Passkey”
@Anil_G this is actual string only
Anil_G
(Anil Gorthi)
September 30, 2023, 6:56am
6
@mint
As per the data looks like some inverted comma are missing can you check
Cheers
mint
(Mintoo)
September 30, 2023, 6:59am
7
@Anil_G
“USER ID=Mintoo;DATA SOURCE=”(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = Mintoo)(PORT = Mintoo)))(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = Mintoo)))“;PASSWORD=Mintoo”
i just recreted using connect db activity for oracle db
Anil_G
(Anil Gorthi)
September 30, 2023, 7:01am
8
@mint
Try this
"USER ID="+ userid + ";DATA SOURCE=""(DESCRIPTION =(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = "+ host + ")(PORT = "+Port + ")))(CONNECT_DATA =(SERVER = DEDICATED) (SERVICE_NAME ="+ servicename + ")))"":PASSWORD=" + password
Cheers
can you try this one
USER ID=Mintoo;DATA SOURCE=(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = Mintoo)(PORT = Mintoo)))(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = Mintoo));PASSWORD=Mintoo
Cheers … @mint
mint
(Mintoo)
September 30, 2023, 7:23am
10
@Anil_G getting ORA-01005 : null passord given logon denied
BUT THE SAME password worked when hardcoded
Anil_G
(Anil Gorthi)
September 30, 2023, 7:27am
11
@mint
Please check if the variable is assigned with the value
Also it would be a good idea to show a screenshot of the actual connection string
And the one you used
Or try to use a log message and log the connection string with variabes and see if it looks same as teh normal strong without variables
Cheers
mint
(Mintoo)
September 30, 2023, 9:14am
12
“PASSWORD=Minto;USER ID=Minto;DATA SOURCE=”(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = Minto)(PORT = Minto)))(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = Minto)))“”
plz help to convert this getting error as not defined
@Anil_G
the key value pair that has minto will be replaced by variable
Anil_G
(Anil Gorthi)
September 30, 2023, 9:29am
13
@mint
Can you please use formatted text and write your string…<\>
Also I see minto every where …which variabe to go where?
Did you use a log message and check if the string in proper after giving variables
Please provide complete info
Cheers
mint
(Mintoo)
September 30, 2023, 12:07pm
14
the key that has minto will be need to convert to variable like Password , userid ,host, port servicename
i tried to print the shared string but then all other object error is coming as not declared
@Anil_G thanks I did tried to replace the way previous string that you helped with but was getting error
Anil_G
(Anil Gorthi)
September 30, 2023, 12:15pm
15
@mint
can yo please show what error it is
also if it is object reference error then one of variable you are using might be null…so it is throwing error
cheers
mint
(Mintoo)
September 30, 2023, 12:16pm
16
“PASSWORD=“+Pass+”;USER ID=“+userid+”;DATA SOURCE=”(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = “+host+”)(PORT = “+port+”)))(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = “+srvicename+”)))“”
Anil_G
(Anil Gorthi)
September 30, 2023, 12:20pm
17
@mint
looks like you missed something…because I tried the same and no errors
please check the variables and use the exact formula as above
cheers
mint
(Mintoo)
September 30, 2023, 12:24pm
18
@Anil_G can you plz check this one :
“PASSWORD=“+Pass+”;USER ID=“+userid+”;DATA SOURCE=”(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = “+host+”)(PORT = “+port+”)))(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = “+srvicename+”)))“”
the format is bit different
Anil_G
(Anil Gorthi)
September 30, 2023, 12:38pm
19
@mint
Check this for new format
"PASSWORD=" + password + ";USER ID=" + userid + ";DATA SOURCE=""(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = " + host + ")(PORT = " + port + ")))(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = " + servername + ")))"""
Hope this helps
Cheers
1 Like
mint
(Mintoo)
September 30, 2023, 1:16pm
20
@Anil_G it worked thanks . One more things any source from where i can learn Linq query please share if possible