473,703 Members | 2,886 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How Can I retrieve Column/Schema Information From ObjectDataSourc e

Hi,

I'd like to retrieve and step through an ObjectDataSourc e's columns to be
able to manually add BoundFields to a GridView control.

I don't know how to do this other than to manually call the
ObjectDataSourc e's Select() method. But this also retrieves all the data,
which I don't want to get at that time.

Your help is quite appreciated.

Regards,
Axel Dahmen
Nov 29 '07 #1
1 1317
Salutations Axel,

The actual schema isn't calculated until ObjectDataSourc e constructs the
ObjectDataSourc eView for your object.

That doesn't happen until you call Select() on ODS.

--
Regards,

Bryan Porter
http://www.bryanporter.com/

"What A Horrible Night To Have A Curse!" - S. Belmont

"Axel Dahmen" <Ke********@new sgroups.nospamw rote in message
news:eL******** ******@TK2MSFTN GP04.phx.gbl...
Hi,

I'd like to retrieve and step through an ObjectDataSourc e's columns to be
able to manually add BoundFields to a GridView control.

I don't know how to do this other than to manually call the
ObjectDataSourc e's Select() method. But this also retrieves all the data,
which I don't want to get at that time.

Your help is quite appreciated.

Regards,
Axel Dahmen

Nov 29 '07 #2

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

Similar topics

5
5304
by: ScottyBaby | last post by:
Hi, I've run into a curious problem with MS SQL Server 8.0. Using sp_help and SQL Query Analyzer's object browser to view the columns returned by a view, I find that sp_help is reporting stale information. In a recent schema change, for example, someone lengthened a varchar column from 15 to 50 characters. If we use sp_help to find out about a view that depends upon this column, it still shows up as VARCHAR(15), whereas the object...
0
2002
by: Dimitris Katsikas | last post by:
Hi everybody, I am trying to find a way to export automatically an entire database schema into an .xsd A graphical way is to drag & drop the tables from Server Connection into an empty .xsd file. My problem is that the xsd does not include info concerning the relationships between database tables. Is there an automated way to retrieve programmatically the entire db schema into a single xsd file?
11
2682
by: jw56578 | last post by:
what is a common method, if any, to retrieve stored query information from Access. MDAC does not support OleDbSchemaGuid.Procedure_Columns. I need stored procedure name and paramter information, can you get this?
0
1326
by: Blibo Baggins | last post by:
How do you get the "Datafield" property of data that's in a Template Column of a Grid? I am using editable Datagrids with Template Columns. When using Boundcolumns, I just used: ColName = CType(dg.Columns(i), BoundColumn).DataField But this doesn't work with TemplateColumns.
6
10676
by: Aaron Smith | last post by:
Ok. I have a dataset that has multiple tables in it. In one of the child tables, I have a column that I added to the DataSet (Not in the DataSource). This column does not need to be stored in the data on the datasource. It simply gets the first name and last name of an instructor and displays it in the grid. I have two major problems.... One, it doesn't display in the column until the row is saved, (Even after calling a refresh on the...
2
1824
by: Dick | last post by:
How do I get to an ObjectDataSource's underlying data/schema. I thought it would have a DataSet property but I can't find it. So how do you find out about the data and/or the schema used to populate a bound control such as the GridView? Specifically I want to do something like this... For Each BoundControl in GridView1 If the DataType of the BoundControl is DateTime Then BoundControl.HtmlEncode="false"
0
2177
by: GMartin | last post by:
I have a pop-up form with a three columned Grid that has checkboxes in a Template Column in the first/left-most column. (The form is to allow users to select "Members" of a group, where they check or clear the boxes next to the potential members they want to add or remove.) The Object Data Source is as follows... <asp:ObjectDataSource ID="odsMembers" runat="server" SelectMethod="GetGroupMembersSelectList"...
5
25567
by: Ken | last post by:
I'm trying to run a loop to capture column property information from a table in my datasource. Can anybody see where this is going wrong? Dim tbl As New DataTable Dim col As DataColumn Dim x As Integer Dim colName(99) As String Dim colType(99) As String cn.Open() tbl = cn.GetSchema("Orders") 'Orders is a table in the
2
1964
by: =?Utf-8?B?RGF2ZSBU?= | last post by:
I have a list box that is bound to an object data source. I added a column, say ColumnC, to my typed data set and for it's expression I entered ColumnA + ': ' + ColumnB When I preview the data in the designer I get exactly what I want. Now I go over to the object data source on my web page, refresh it and refresh the schema. I can now see ColumnC as an option for the list box's data text field. However, when I run the page...
0
8744
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
8659
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
9103
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8996
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
8952
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...
1
6585
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5920
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4674
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2055
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.