Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
XmlToCursor()
Message
From
27/09/2001 13:41:37
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00552820
Message ID:
00561563
Views:
26
Francois,
Instead of lnRecords checking, just after execute you could control :

if oRecordset.Eof
* No recs returned
else
...
endif

Cetin
>Cetin,
>
>Sorry to disturb you again with this Thread but i have some problem when the number of records is zéro. XMLTOCURSOR() return 2 blank records when the result is nothing from my ADO-SQL.
>
>Can u help on this?
>
>
>*The little program
>CLEAR
>oConnection	= NEWOBJECT("ADODB.Connection")
>oStream		= NEWOBJECT("ADODB.Stream")
>oConnection.Provider = "SQLOLEDB.1"
>oConnection.ConnectionString = ;
>	"Persist Security Info=False;User ID=sa;"+;
>	"Initial Catalog=Shipping;Data Source=FDURO_W2K"
>oConnection.open
>
>lcSelect = ;
>	"SELECT * FROM INCIDENT" <B>&& This table is empty!!!</B>
>
>lnRecords = 0
>oRecordSet = oConnection.Execute(lcSelect, lnRecords)
>oRecordSet.Save(oStream, 1)
>XMLTOCURSOR(oStream.ReadText, "MyCursorName", 1028)
>lnRecords = RECCOUNT('MyCursorName')
>
>RELEASE oRecordSet
>RELEASE oConnection
>RELEASE oStream
>
>Dspl = " _Total Reccords:"+STR(lnRecords,9,0)
>? Dspl <B>&& Dspl Give me 2 cause by blank records </B>
>
>
>Thanks
>
>François
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform