473,327 Members | 1,967 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Select() is being called automatically

Hi,

I am using a SqlDataSource and a FormView.
The problem I have is I need to call SqlDataSource.Select() manually (I
need to grab the DataSet). However, the FormView appears to call
.Select() as well.

Can I stop this from happening so the Select() is only called when I
decide.

I don't want to disconnect the SqlDataSource and the FormView since I
can easily add / remove columns. This is possibly the only way I cna
think of doing it, if SDS and FormView were disconnected I could do
this:

1. Call .Select
2. Set the DataSource of the FormView to the DataSet
3. Call .DataBind()

Any help on this matter would be appreciated.

Steven

*** Sent via Developersdex http://www.developersdex.com ***
Jul 12 '06 #1
1 1431
I may have found a work around:

FormView1.DataSourceID = null;

DataSet ds =
((DataView)sbsTest.Select(DataSourceSelectArgument s.Empty)).Table.DataSe
t;

FormView1.DataSource = ds;
FormView1.DataBind();

When I want to Insert or Update, I call Insert() or Update() manually.

Anyone see any problems with this approach?

Steven


*** Sent via Developersdex http://www.developersdex.com ***
Jul 12 '06 #2

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

Similar topics

6
by: Squeamz | last post by:
Hello, Say I create a class ("Child") that inherits from another class ("Parent"). Parent's destructor is not virtual. Is there a way I can prevent Parent's destructor from being called when a...
0
by: Bill Agee | last post by:
I have a Select query which contains a field called AMWnum (long) which represents a sequence # of sorts. If I want to copy a row of information and paste it on the bottom, all is OK. I have...
11
by: Neo Geshel | last post by:
I have an Access DB, from which I am going to pull images. Each image has an associated ID, but the ID's are not necessarily sequential (some images may have been deleted, leaving gaps in the list...
4
by: Niels Jensen | last post by:
Hi, I'm a bit of a newbie to VB.NET so please forgive me if I get the terminology incorrect... I'm still learning :) I have a form with five numUpDown controls representing different ratios...
5
by: Maxwell | last post by:
Hello, Newbie question here. I have a VS.NET 2003 MC++ (not C++/cli) project where I have a managed class reference in a unmanaged class...simple enough. To keep things short I am for the most...
2
by: Ralphie | last post by:
Hi, I am working with MS Access and I am trying to select a value for a golf green fee from a table called "tblgreenfee". The table has several variables, ,, which changes the green fee charged....
16
by: Richard Maher | last post by:
Hi, I have this Applet-hosted Socket connection to my server and in an ONevent/function I am retrieving all these lovely rows from the server and inserting them into the Select-List. (The on...
5
by: raylopez99 | last post by:
I have a form, Form6, that has a bunch of buttons overlaid on it. I want to be able to click on any arbitrary area of the form, and if that area of the form is overlaid by a button, I want to...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.