473,406 Members | 2,371 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Record Set question

I am calling a Visual Basic 6 DLL to that returns a Record Set.

Here is my code in my VB.NET program.

Dim objRS

objRS = oMyObject.ReturnRecordSet()

If Not objRS Is Nothing Then
Do While Not objRS.EOF
sw.WriteLine(objRS("UserID"))
sw.WriteLine(objRS("UserName"))
objRS.MoveNext()
Loop
End If
What happens is objRS just returns System.__ComObject.

How do I get this to work? That is, to get the returned Record Set and
then be able to enumerate through the records.
Nov 21 '05 #1
4 1650
Hi,

Stop using late binding.

Dim objRS as RecordSet

Ken
---------------------
"vbmark" <no@email.com> wrote in message
news:Xn************************@199.45.49.11...
I am calling a Visual Basic 6 DLL to that returns a Record Set.

Here is my code in my VB.NET program.

Dim objRS

objRS = oMyObject.ReturnRecordSet()

If Not objRS Is Nothing Then
Do While Not objRS.EOF
sw.WriteLine(objRS("UserID"))
sw.WriteLine(objRS("UserName"))
objRS.MoveNext()
Loop
End If
What happens is objRS just returns System.__ComObject.

How do I get this to work? That is, to get the returned Record Set and
then be able to enumerate through the records.
Nov 21 '05 #2
I get "Type 'RecordSet' is not defined"

What do I need to Import?

"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in news:uMVuVI7KFHA.1136
@TK2MSFTNGP10.phx.gbl:
Hi,

Stop using late binding.

Dim objRS as RecordSet

Ken
---------------------
"vbmark" <no@email.com> wrote in message
news:Xn************************@199.45.49.11...
I am calling a Visual Basic 6 DLL to that returns a Record Set.

Here is my code in my VB.NET program.

Dim objRS

objRS = oMyObject.ReturnRecordSet()

If Not objRS Is Nothing Then
Do While Not objRS.EOF
sw.WriteLine(objRS("UserID"))
sw.WriteLine(objRS("UserName"))
objRS.MoveNext()
Loop
End If
What happens is objRS just returns System.__ComObject.

How do I get this to work? That is, to get the returned Record Set and
then be able to enumerate through the records.


Nov 21 '05 #3
vbmark,

Probably is the solutioon, what when you don't give late binding

Dim objRS as RecordSet

I hope this helps,

Cor
Nov 21 '05 #4
Never mind. I added a reference to adodb.

Thanks.

vbmark <no@email.com> wrote in
news:Xn************************@199.45.49.11:
I get "Type 'RecordSet' is not defined"

What do I need to Import?

"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in
news:uMVuVI7KFHA.1136 @TK2MSFTNGP10.phx.gbl:
Hi,

Stop using late binding.

Dim objRS as RecordSet

Ken
---------------------
"vbmark" <no@email.com> wrote in message
news:Xn************************@199.45.49.11...
I am calling a Visual Basic 6 DLL to that returns a Record Set.

Here is my code in my VB.NET program.

Dim objRS

objRS = oMyObject.ReturnRecordSet()

If Not objRS Is Nothing Then
Do While Not objRS.EOF
sw.WriteLine(objRS("UserID"))
sw.WriteLine(objRS("UserName"))
objRS.MoveNext()
Loop
End If
What happens is objRS just returns System.__ComObject.

How do I get this to work? That is, to get the returned Record Set
and then be able to enumerate through the records.


Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Tim Marshall | last post by:
This is an embarrassing question to which I should know the answer, but I am not 100% sure of myself. My applications, whether they are Jet or Oracle usually deal with reporting on existing apps...
1
by: Tom Lee | last post by:
Hi Guys, Firstly thanks for all the help you have providing me... I have another question I was stuck with. Here is a simple code dim strsql as string dim scr as recordset
3
by: John Ortt | last post by:
> I have a table of dates in ascending order but with varying intervals. I > would like to create a query to pull out the date (in field 1) and then pull > the date from the subsequent record...
5
by: Sami | last post by:
Please bear with me, and if you answer this question, please do it step by step. I am new at Access, not at all sophisticated. I am using Office XP. This will need to be read in Access for...
4
by: Richard | last post by:
In normal asp i used --------- objRS.Open "tbl_Nieuws", objConn, 1, 3 objRS.AddNew objRS.Fields("N_Datum") = FormatDateTime(Now(),2) objRS.Fields("N_Title") =...
9
by: Greg | last post by:
Binding Manager & dataset - won't add record I've got an untyped dataset with controls bound through code. The user can select a question number from a bound combobox, and the question number and...
0
by: jakev2003 | last post by:
I have a form that has values from many different tables. Here are the tables: - Questions(ID, UserID, Question) - Users(UserID, Name, Email_Address, Other_Info) So when I browse through...
1
by: Ryker | last post by:
I have a lengthy form containing several fields of data. Each record that is entered is given a record identification number. Sometimes the user gets midway into the form and has to stop to...
10
by: john | last post by:
In a form, when you arrive in a new record, what event is trigerred and in which object? I can't find such an event. I need to reset a value when the user arrives in a next record. Thanks, john
2
by: glynester | last post by:
I have some code that works off the update event of a textbox field (which is a part of a record in a continuous form). If certain conditions are met (following the updating of the field), I want a...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.