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

Pass recordset from code-behind to aspx file

P: n/a
All-
I have established an adodb recordset in my code-behind, and I need to
pass it to the aspx file. I can't seem to figure out if there is a way
to do this. I see you can pass a string over using the
GetCallbackResult, but a recordset won't pass this way.

Any ideas???
Thanks

Jun 9 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
It doesn't even have to be a recordset. It could be an array, etc. I
need a way to pass variables, beyond strings, from the aspx.vb file to
the aspx file.

Has anyone done this? I can't seem to figure it out.
sl**************@gmail.com wrote:
All-
I have established an adodb recordset in my code-behind, and I need to
pass it to the aspx file. I can't seem to figure out if there is a way
to do this. I see you can pass a string over using the
GetCallbackResult, but a recordset won't pass this way.

Any ideas???
Thanks


Jun 9 '06 #2

P: n/a
Huh??

First, if you're using ADODB recordsets, you're probably doing something
wrong.

DataSets, IDataReaders are the "new" data model. If you used the upgrade
wizard, then I'd suggest refactoring that code.

...

You don't "pass" a datastore to the aspx file.
You usually put a control on the aspx page, and then bind it to a datasource
on the code behind page.

...

in 1.1, you'll do this

draw a datagrid on the aspx page.

on the page load

if (!Page.IsPostBack)
{
this.DataGrid1.DataSource = something;// where something is usually
a DataSet, IDataReader or an Array, or a CollectionBase
this.DataGrid1.DataBind();
}
asp.net is not an upgrade from asp. its a completely different animal

<sl**************@gmail.com> wrote in message
news:11*********************@g10g2000cwb.googlegro ups.com...
It doesn't even have to be a recordset. It could be an array, etc. I
need a way to pass variables, beyond strings, from the aspx.vb file to
the aspx file.

Has anyone done this? I can't seem to figure it out.
sl**************@gmail.com wrote:
All-
I have established an adodb recordset in my code-behind, and I need to
pass it to the aspx file. I can't seem to figure out if there is a way
to do this. I see you can pass a string over using the
GetCallbackResult, but a recordset won't pass this way.

Any ideas???
Thanks

Jun 9 '06 #3

P: n/a
sl**************@gmail.com wrote:
All-
I have established an adodb recordset in my code-behind, and I need to
pass it to the aspx file. I can't seem to figure out if there is a way
to do this. I see you can pass a string over using the
GetCallbackResult, but a recordset won't pass this way.

If you really have an adodb.recordset, then you must be using interop,
right?
Anyways, you can do something like this:
http://www.davidpenton.com/testsite/...ver2client.asp

or this, if you don't really need the recordset functionality:

http://www.davidpenton.com/testsite/...ta.islands.asp

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jun 9 '06 #4

P: n/a
Sorry, I'm using an adodb recordset because I wanted to set the
datasource of an office web component Pivottable equal to one. I read
that you could only use an xml file, a office web component data source
control, or a recordset. There was no mention of being able to use a
DataSet.

Now I can't draw the control for the Pivottable on the aspx page. I
have to place this in the aspx file
<-object classid="clsid:0002E552-0000-0000-C000-000000000046"
id="Pivot1" height="300" width="600"></object>

or do a response.write("<object
classid="clsid:0002E552-0000-0000-C000-000000000046" id="Pivot1"
height="300" width="600"></object>") in the aspx.vb pivottable.

Either way, the control isn't something that I can reference in the
aspx.vb by saying
Pivot1.DataSource = XXXXXXX
So I need to response.write("Pivot1.Datasource = " + adodbRS)
or some way to pass the record set over to the aspx file so I can
assign the datasource of the pivot table to it.

Does this make sense? Any way to accomplish something like this?

Thanks for the response!
sloan wrote:
Huh??

First, if you're using ADODB recordsets, you're probably doing something
wrong.

DataSets, IDataReaders are the "new" data model. If you used the upgrade
wizard, then I'd suggest refactoring that code.

..

You don't "pass" a datastore to the aspx file.
You usually put a control on the aspx page, and then bind it to a datasource
on the code behind page.

..

in 1.1, you'll do this

draw a datagrid on the aspx page.

on the page load

if (!Page.IsPostBack)
{
this.DataGrid1.DataSource = something;// where something is usually
a DataSet, IDataReader or an Array, or a CollectionBase
this.DataGrid1.DataBind();
}
asp.net is not an upgrade from asp. its a completely different animal

<sl**************@gmail.com> wrote in message
news:11*********************@g10g2000cwb.googlegro ups.com...
It doesn't even have to be a recordset. It could be an array, etc. I
need a way to pass variables, beyond strings, from the aspx.vb file to
the aspx file.

Has anyone done this? I can't seem to figure it out.
sl**************@gmail.com wrote:
All-
I have established an adodb recordset in my code-behind, and I need to
pass it to the aspx file. I can't seem to figure out if there is a way
to do this. I see you can pass a string over using the
GetCallbackResult, but a recordset won't pass this way.

Any ideas???
Thanks


Jun 9 '06 #5

P: n/a
Someone has to have needed to do something like this in the past...any
tips on passing a recordset/dataset from the code-behind to the aspx
page?
sl**************@gmail.com wrote:
Sorry, I'm using an adodb recordset because I wanted to set the
datasource of an office web component Pivottable equal to one. I read
that you could only use an xml file, a office web component data source
control, or a recordset. There was no mention of being able to use a
DataSet.

Now I can't draw the control for the Pivottable on the aspx page. I
have to place this in the aspx file
<-object classid="clsid:0002E552-0000-0000-C000-000000000046"
id="Pivot1" height="300" width="600"></object>

or do a response.write("<object
classid="clsid:0002E552-0000-0000-C000-000000000046" id="Pivot1"
height="300" width="600"></object>") in the aspx.vb pivottable.

Either way, the control isn't something that I can reference in the
aspx.vb by saying
Pivot1.DataSource = XXXXXXX
So I need to response.write("Pivot1.Datasource = " + adodbRS)
or some way to pass the record set over to the aspx file so I can
assign the datasource of the pivot table to it.

Does this make sense? Any way to accomplish something like this?

Thanks for the response!
sloan wrote:
Huh??

First, if you're using ADODB recordsets, you're probably doing something
wrong.

DataSets, IDataReaders are the "new" data model. If you used the upgrade
wizard, then I'd suggest refactoring that code.

..

You don't "pass" a datastore to the aspx file.
You usually put a control on the aspx page, and then bind it to a datasource
on the code behind page.

..

in 1.1, you'll do this

draw a datagrid on the aspx page.

on the page load

if (!Page.IsPostBack)
{
this.DataGrid1.DataSource = something;// where something is usually
a DataSet, IDataReader or an Array, or a CollectionBase
this.DataGrid1.DataBind();
}
asp.net is not an upgrade from asp. its a completely different animal

<sl**************@gmail.com> wrote in message
news:11*********************@g10g2000cwb.googlegro ups.com...
It doesn't even have to be a recordset. It could be an array, etc. I
need a way to pass variables, beyond strings, from the aspx.vb file to
the aspx file.

Has anyone done this? I can't seem to figure it out.
sl**************@gmail.com wrote:
> All-
> I have established an adodb recordset in my code-behind, and I need to
> pass it to the aspx file. I can't seem to figure out if there is a way
> to do this. I see you can pass a string over using the
> GetCallbackResult, but a recordset won't pass this way.
>
> Any ideas???
>
>
> Thanks


Jun 12 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.