Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Lotus Connectors, OLEDB and FOR XML

0 views
Skip to first unread message

Moco

unread,
Aug 5, 2004, 11:14:38 AM8/5/04
to
Hi,
I'm connecting to a SQL Server database with LC LSX and OLEDB.
I wish I could retrieve XML using SQL clause "FOR XML" in SQL Server;
Unfortunately, the text returned to the connector is pretty messed up
(contains the data but also a bulk of unrecognised characters). So,
everything works as long as I play with normal recordset, but when it comes
to xml.....
Has anybody successfully retrieved XML from a Connector?

TIA

Here's some code:

SQL SERVER STORED PROCEDURE:

SELECT CustomerID, CompanyName, City, Country, Phone
FROM Customers
WHERE Country IN ('Italy', 'Germany')
FOR XML AUTO


LOTUSSCRIPT AGENT:
Dim con As New LCConnection("oledb")
Dim parmFieldList As New LCFieldList
Dim getField As LCField
Dim count As Integer, i As Integer
Dim outputFieldList As New LCFieldList
Dim msg$

con.provider = "sqloledb"
con.server = "MyServer"
con.Userid = "TestApplication"
con.Password = "connectme"
con.Database = "Northwind"
con.Procedure = "LCSimpleSelect"
con.Connect

count = con.Call ( Nothing, 1, outputFieldList)

Do While (con.Fetch (outputFieldList, 1, 1) > 0)
For i = 1 To outputFieldList.FieldCount
Set getField = outputFieldList.getField(i)
msg$ = msg$ & getField.Text(0) & Space$(1)
Next
msg$ = msg$ & Chr$(10)
Loop
Msgbox msg$,, "CALL"

OUTPUT:
"?CustomerID?CompanyName?City?Country?Phone?Customers?A????????&Alfreds
Futterkiste^????????? Germany???????????????A????????.Blauer See
Delikatessen^?.


0 new messages