10-30-2012, 02:58 AM
Okay, I can use the ADO to connect to my databases and I can pull information - I only have read access for testing.
Anyway, when I pull back the specific item I was doing this for, I get extra characters - {}.
It does not appear in the DB with the braces on the outside when I SQL Server manager.
Let's assume the GUID I am looking for is in the correct location and shows: 123-234-456
Here is what I am using in QTP:
So, I expect:
https://test.test.net/survey.aspx?sid=123-234-456
But I am getting:
https://test.test.net/survey.aspx?sid={123-234-456}
Anyone have any ideas why?
Anyway, when I pull back the specific item I was doing this for, I get extra characters - {}.
It does not appear in the DB with the braces on the outside when I SQL Server manager.
Let's assume the GUID I am looking for is in the correct location and shows: 123-234-456
Here is what I am using in QTP:
Code:
Dim sConnect, sDatabase, sRecord, sGUID, sURL, sSQL
Set sConnect=Createobject("ADODB.Connection") 'Connect
sDatabase="Driver={SQL Server};Server=testing.intgdb.testthis.com;DATABASE=MainQA;UID=jcc26;Password=******"
sConnect.open (sDatabase)
sSQL="Select Guid1 from dbo.pat inner join dbo.SurveyPat on dbo.pat.pat_id=dbo.SurveyPat.pat_ids where email = 'test9901@mailinator.com'"
Set sRecord = sConnect.Execute(sSQL)
sGUID = sRecord.GetString
sURL = "https://test.test.net/survey.aspx?sid="&sGUID
msgbox sURL 'for testing
https://test.test.net/survey.aspx?sid=123-234-456
But I am getting:
https://test.test.net/survey.aspx?sid={123-234-456}
Anyone have any ideas why?