While running below script I am getting the following error:
Format of the initialization string does not conform to specification starting at index 0
Can you help me to fix this issue?
Code is as below
<BaseObjectTypeAttribute("PwOHelperPwO")> _
Public Function CCC_GetProductIdent( ByVal dbPwOHelperPwO As ISingleDbObject) As String
Dim scriptErrorBase As String = "Script Error [CCC_GetProductIdentfromRequest]"
Dim returnValue As iDatareader
Dim results As New StringBuilder
Dim connData As ConnectData = DbApp.Instance.Connect(VID_GetValueOfDialogdatabases("ConnectionString"))
Dim cSQL As SqlExecutor = Connection.CreateSqlExecutor(connData.PublicKey)
Dim pwoUID As String = dbPwoHelperPwo.GetValue("UID_PersonWantsOrg")
Dim myQuery As String = String.Format("select " &
"apg.Ident_AccProductGroup " &
"from PersonWantsOrg pwo" &
" inner join QERAssign qas" &
" On pwo.ObjectKeyOrdered = qas.XObjectKey" &
" inner join AccProduct apd" &
" On qas.UID_AccProduct = apd.UID_AccProduct" &
" inner join AccProductGroup apg" &
" On apd.UID_AccProductGroup = apg.UID_AccProductGroup " &
"where pwo.UID_PersonWantsOrg = '{0}'",pwoUID)
Try
returnValue = cSQL.SqlExecute(String.Format(myQuery))
While returnValue.Read()
results.Append(returnValue("Ident_AccProductGroup").ToString)
End While
Catch ex As Exception
Throw New Exception(String.Format("{0} {1} {2}", scriptErrorBase, myQuery, ex))
End Try
Return results.ToString
End Function