By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,610 Members | 2,155 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,610 IT Pros & Developers. It's quick & easy.

disconnected recordset (msdatashape) no longer works?

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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.