Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > DataSet designer won't let me set GenerateDBDirectMethods to true

Reply
Thread Tools

DataSet designer won't let me set GenerateDBDirectMethods to true

 
 
Alan Silver
Guest
Posts: n/a
 
      07-20-2006
Hello,

I am trying to persuade VS2005 to let me use a DataSet to insert to a
table. I add a DataSet item to the App_Code folder, and the wizard comes
up. I go through the steps, but when I get to the step where it asks if
I want to fill or return a datatable, the third option, to generate
methods for insert, update and delete is greyed out.

According to MSDN... "This option is unavailable when the original SQL
statement does not provide enough information or the query is not an
updateable query. This situation can occur, for example, in JOIN queries
and queries that return a single value (scalar)." I can't see how this
is relevant as I tried it with the simplest of SQL queries.

The really weird thing is that some of the tables in the database allow
the option to be set, and some do not. I have stared stupidly at these
tables trying to spot some difference, but I can't.

Anyone any ideas? TIA

--
Alan Silver
(anything added below this line is nothing to do with me)
 
Reply With Quote
 
 
 
 
Alan Silver
Guest
Posts: n/a
 
      07-20-2006
In article <>, Alan Silver
<alan-> writes
>Anyone any ideas? TIA


In case it helps anyone, I discovered that if you use "select * from
table" for the SQL, it works. You can then look at the properties of the
adapter, and open the query builder for the select command. This will
replace the * with the field names, at which point you can either just
save it, or edit the field list and then save it.

Having said that, I did discover further that you don't actually need
this feature at all. Once you have the adapter set up, you can just add
a new query, set it to be an insert and it will create a nice method for
you. Much easier, and it only creates the methods you want, rather than
extras that you don't want.

I still think the behaviour I observed was a bug, but I'm not going to
bother with it.

HTH

--
Alan Silver
(anything added below this line is nothing to do with me)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[False,True] and [True,True] --> [True, True]????? bdb112 Python 45 04-29-2009 02:35 AM
object does not allow to set GenerateDBDirectMethods true Mo ASP .Net 0 10-02-2007 01:43 AM
OT: Let me in! Let me in! quasi/various/bob [7.13.86.42] MCSE 7 05-30-2006 10:00 PM
Have a nice day! ...//more of your parables. Pray let us know whoyou are, let us Ravens U. Locksmith Python 1 05-26-2004 11:00 AM
Let or not let the text float Luigi Donatello Asero HTML 6 01-15-2004 04:08 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57