468,244 Members | 2,028 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,244 developers. It's quick & easy.

disconnected recordset (msdatashape) no longer works?

I use the shape object to make recordsets that have no db
connection for use in grids and such. For example

(mPhoneNumbersRS as ADODB.Recordset)
****************************************
mPhoneNumbersRS.let_ActiveConnection
("Provider=MSDataShape;Data Provider=none;Data
Source=localhost;")

sTmp = "SHAPE APPEND NEW adChar(20) as Type, NEW advarChar
(20) as PhoneNumber, NEW advarChar(6) as Ext, NEW adChar
(1) as Dial, NEW adNumeric (7,0) as CodeID"

mPhoneNumbersRS.Open(sTmp, ,
ADODB.CursorTypeEnum.adOpenStatic,
ADODB.LockTypeEnum.adLockOptimistic)

PhoneGrid.DataSource = mPhoneNumbersRS
*****************************************

This *used* to work in VB6, but now I get an error. I've
read through all the KB articles I could find
on 'msdatashape' and everything pertains to ADO.NET. I'm
not ready to use ADO.NET. Is there a way where I can
still use my trusty old MSDataShape in VB.NET without
going to ADO.NET?
Nov 20 '05 #1
2 2597
Cor
Hi Eric,

You are going on a route that has no end.

Databinding in VB.net is possible with any class that implements the
IBindingList Or ITypedList that includes dataset, dataview, datatable.

As far as I know there is no recordset in it.

So you maybe can get your ADODB working, but then you have the next problem.

I would go looking for the dataset and the dataview using OleDB or SQL.

I hope this helps you a little bit on the right route?

Cor
Nov 20 '05 #2
Hello Eric,
I agree with Cor. However, in the interim if you must use ADO with
msdatashape, there are two things you can do.
1. Use the Fill method of the OleDbDataAdapter class to convert the ADODB
recordset to a DataTable.

You can do this by using the technique in the following article.

ID: 310349
HOW TO: Use the OleDbDataAdapter to Fill a DataSet from an ADO Recordset
http://support.microsoft.com/?id=310349

I tried this with an ADODB recordset using MSDatashape, and it seemed to
work pretty well.
2. Use the older VB6 controls, such as MSHFlexGrid, which support the data
binding to an ADODB recordset.

I hope this helps!

Keith Fink
Microsoft Developer Support

Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Steve Jorgensen | last post: by
1 post views Thread by Arpan | last post: by
4 posts views Thread by =?Utf-8?B?R1ROMTcwNzc3?= | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by kermitthefrogpy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.