473,748 Members | 10,889 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Pass recordset from code-behind to aspx file

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
GetCallbackResu lt, but a recordset won't pass this way.

Any ideas???
Thanks

Jun 9 '06 #1
5 3046
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
GetCallbackResu lt, but a recordset won't pass this way.

Any ideas???
Thanks


Jun 9 '06 #2
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.IsPostBa ck)
{
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******** *************@g 10g2000cwb.goog legroups.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
GetCallbackResu lt, but a recordset won't pass this way.

Any ideas???
Thanks

Jun 9 '06 #3
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
GetCallbackResu lt, 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
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.DataSour ce = XXXXXXX
So I need to response.write( "Pivot1.Datasou rce = " + 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.IsPostBa ck)
{
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******** *************@g 10g2000cwb.goog legroups.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
GetCallbackResu lt, but a recordset won't pass this way.

Any ideas???
Thanks


Jun 9 '06 #5
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.DataSour ce = XXXXXXX
So I need to response.write( "Pivot1.Datasou rce = " + 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.IsPostBa ck)
{
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******** *************@g 10g2000cwb.goog legroups.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
> GetCallbackResu lt, but a recordset won't pass this way.
>
> Any ideas???
>
>
> Thanks


Jun 12 '06 #6

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

Similar topics

1
1799
by: Rufus DeDufus | last post by:
This is more a matter of programming taste ... I have a Database DLL that is calling into Access through OLEDB, and exposes functions like AddPerson(STRING szFirstName, STRING szLastName, INT uAge) etc. Now I want to interrogate it in this manner: GetPersonsBetweenAges(INT uLowerAge, INT uUpperAge, ..), and get back a recordset of Persons.
3
13421
by: JingleBEV | last post by:
Hi all, I am trying not to use global variable to maintain data consistency. Some procedures and functions will require to pass the recordset object for processing and functions may also return the recordset object to the calling functions/procedures. I already tried this but keep getting error 13 (type mismatch). how can I achieve it? Your help is appreciated.
3
3888
by: Lyn | last post by:
Hi, I have been experiencing a problem passing a LIKE statement in the WHERE argument of a DoCmd.Openform statement. I have posted that issue separately. However, in an attempt to work around the problem, I thought of using OPENARGS to pass information to the form being opened (instead of using WHERE). In the parent form, I have generated a RecordSet (RS) with the information
7
21632
by: Zlatko Matiæ | last post by:
Let's assume that we have a database on some SQL server (let it be MS SQL Server) and that we want to execute some parameterized query as a pass.through query. How can we pass parameters to the server ? Is it possible to use parameters in pass-through queries ? An additional question: Is it possible to connect to a database on MySQL or PostgreSQL using ADO ? Is it possible to execute pass-through queries with parameters, using ADO...
3
3185
by: Andrew Mueller | last post by:
Hello, I tried this question prior and got no response, so thought I would try to explain differently.. I am not sure which type of object to pass between a VB 6.0 ActiveX dll and C#. I am wrapping a COM object because I am having issues with the types that C# does not seem to understand. I need to be able to use a method from the VB 6.0 dll which will query a proprietary data structure. I then need to return this and iterate...
0
962
by: stanley | last post by:
hello all, 1 - is it posiblle to pass ADO Recordset as a parameter from C++ managed code (.Net MC++) to a C++ unmanaged code (the old existing code) function?? how can i do it using the P-Invoce mechanism? if it's not posibble - how can i call an exisiting C++ unmanaged function that expect me to pass a Recordset parameter??? 2- the same question but i need to pass the unmanaged function an IUnknown* parameter(hold the connection to the...
3
12607
by: ILCSP | last post by:
Hello, I'm fairly new to the concept of running action pass through queries (insert, update, etc.) from Access 2000. I have a SQL Server 2000 database and I'm using a Access 2K database as my front end. I'm using a blank pass through query which gets the Transact-SQL part inserted from a button in my form. After inserting the Transact-SQL code into the pass through query, I 'open the recordset' to make the query run. However,...
1
10482
by: Mayhem05 | last post by:
I have an Access 2003 database that I need to write some VBA code for to populate a table. The table is based on a query I have built in Access queries. Right now I have 2 parameters that are passed to the query from a form (DateFrom and DateTo). When I open the form and populate the variables (DateFrom and DateTo) then open the query it works fine. My problem is that I need to do this from VBA coding and pass the 2 parameters to the...
1
1461
by: tjjones70 | last post by:
I am trying to load list boxes from an Access database. I'm looking at 3 tables and for each table I'm loading a list box that has current information and another list box that has expired information based on a date/time field in each table. I'm trying to write a function that will do this instead of writing a procedure for each listbox. I can't get the function to use variables for the listbox. Here is what I'm doing. Private Sub InForm() ...
13
16978
by: ChrisD76 | last post by:
Hi, I am new to using VBA, and have been working with DAO Recordsets. I'm working on a little problem, and think that DAO Recordsets are the solution. I've been playing around with them to try and get it working, and have the following code, which works perfectly: Function ReadCourseContent() Dim db As DAO.Database Dim rst As DAO.Recordset Set db = CurrentDb() Set rst =...
0
8991
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8830
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9541
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9321
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9247
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4602
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4874
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2782
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.