12-03-2019 10:22 AM
Hi, I want to create an external keyword DataSet, with data retrieved from an external database.
I use a database created in SQL Server. To connect to this database I have configured an ODBC data source (32 bits).
My VBScript code is described below.
However, when I try to test my External DataSet I can't get any results. I think is the connection with the database.
I also try with SQL Select String, but i got empty result.
Can someone helps me ?
Configuration :
Sub GetKeywordDataSetRecords(filterValue, context, results) Const DB_DSN = "DSN=Dematerialisation_DEV;UID=hsi;PWD=******;" Dim oConn Dim sSQL Dim oRecordSet Set oConn = CreateObject("ADODB.Connection") oConn.Open DB_DSN sSQL = "select username FROM useraccount WHERE username LIKE '" & filterValue & "%'" Set oRecordSet = CreateObject("ADODB.Recordset") oRecordSet.Open sSQL, oConn, adOpenKeyset While Not oRecordSet.EOF ' Loop until endd fo file is reached CALL results.BeginRow() CALL results.AddData("keyvaluechar",oRecordSet(0)) CALL results.EndRow() oRecordSet.MoveNext 'Moves the RecordSet pointer to the next position Wend oRecordSet.Close oConn.Close Set oRecordSet = Nothing Set oConn = Nothing End Sub
12-03-2019 12:28 PM
I think your query needs the schema
SELECT username FROM hsi.useraccount
12-03-2019 12:28 PM
I think your query needs the schema
SELECT username FROM hsi.useraccount
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.