Click here to Skip to main content
15,886,664 members
Home / Discussions / Database
   

Database

 
GeneralRe: alteration of date format in table column Pin
Sonia Gupta4-Oct-07 23:22
Sonia Gupta4-Oct-07 23:22 
GeneralRe: alteration of date format in table column Pin
pmarfleet4-Oct-07 23:28
pmarfleet4-Oct-07 23:28 
QuestionSQLServer Activity Logs Pin
Vasudevan Deepak Kumar4-Oct-07 20:56
Vasudevan Deepak Kumar4-Oct-07 20:56 
QuestionProblem in Join Pin
banker_kiran4-Oct-07 20:39
banker_kiran4-Oct-07 20:39 
AnswerRe: Problem in Join Pin
pmarfleet4-Oct-07 22:05
pmarfleet4-Oct-07 22:05 
Questionproblem in a query Pin
Shuaib wasif khan4-Oct-07 13:55
Shuaib wasif khan4-Oct-07 13:55 
AnswerRe: problem in a query Pin
pmarfleet4-Oct-07 19:47
pmarfleet4-Oct-07 19:47 
QuestionTableAdapter Insert Query - a mystery Pin
dmagnant4-Oct-07 9:42
dmagnant4-Oct-07 9:42 
Hello,

I have a question regarding the tableadapter insert query as automatically generated by the QueryBuilder. I am using VS2005 with SQL Sever 2005.

After having spent some time working on an application I have noticed the following;

In one situation I have a form bound to a table that uses an identity field as its key. When I built the tableadapter using the QueryBuilder I selected the refresh after insert option. As expected, this created an insert query that did not write back the key field so as not to override the table generated identity value. Also, as hoped, immediately after inserting a new record, the form refreshes with the database table generated key value (not a dataset datatable generated value)

However, when I look at the text of the TableAdapter's insert query, there is no select statement following the insert query. Though, if I wave the mouse over the CommandText property on the DateSet screen, the yellow preview balloon shows both an insert and select command.

Can anyone explain this?

Secondly, I was just working on another part of the application - different table, different form. Here too, when creating the TableAdapter I requested a refresh after insert. This table does not use an Identity field key, though it has several table generated fields that I want refreshed back to the dataset immediately after an insert. Here again, the Insert query does not show a following select refresh statement. Again, the yellow popup balloon over the CommandText property shows a select statement. In this case however, when the form is run, the refresh after insert does not happen. I then manually added a select statement following the insert query (the query editor tells me it cannot parse the query, but lets me ignore the fact) and everything works fine. By the way, the yellow pop up balloon over the Insert Query's CommandText property now shows two select statements.

Question: When building a table adapter, when the refresh after insert option is checked, should I or should I not expect to see a Select statement following the Insert query when I look at the actual TableAdapter Query text? Is the Select statement in fact included, but not accessible?

Question: Is it only when one is trying to refresh the value of an Identity based field that one has to explicitly enter a refresh select statement (even though in the first situation sited above, the identity field was refreshed without my having explicitly added a following select statement)?

Anyhow, I'm just trying to find some predictable and logical pattern in how this works.
If anyone can shed some light on the above I would be most thankful.




AnswerRe: TableAdapter Insert Query - a mystery Pin
dmagnant4-Oct-07 9:57
dmagnant4-Oct-07 9:57 
QuestionProblem with local website after using SSMSE to access the database Pin
Sunset Towers4-Oct-07 8:13
Sunset Towers4-Oct-07 8:13 
QuestionHow to fetch the no of records retrieved thru FULLTEXT Pin
s.sathyanarayanan4-Oct-07 8:12
s.sathyanarayanan4-Oct-07 8:12 
AnswerRe: How to fetch the no of records retrieved thru FULLTEXT Pin
Joe4-Oct-07 9:05
Joe4-Oct-07 9:05 
GeneralRe: How to fetch the no of records retrieved thru FULLTEXT Pin
s.sathyanarayanan4-Oct-07 9:11
s.sathyanarayanan4-Oct-07 9:11 
GeneralRe: How to fetch the no of records retrieved thru FULLTEXT Pin
Joe4-Oct-07 19:30
Joe4-Oct-07 19:30 
GeneralRe: How to fetch the no of records retrieved thru FULLTEXT Pin
Vasudevan Deepak Kumar4-Oct-07 19:43
Vasudevan Deepak Kumar4-Oct-07 19:43 
QuestionHow do we select only those columns that aren`t null Pin
NetBot4-Oct-07 8:06
NetBot4-Oct-07 8:06 
AnswerRe: How do we select only those columns that aren`t null Pin
Joe4-Oct-07 8:57
Joe4-Oct-07 8:57 
GeneralRe: How do we select only those columns that aren`t null Pin
PIEBALDconsult4-Oct-07 9:32
mvePIEBALDconsult4-Oct-07 9:32 
AnswerRe: How do we select only those columns that aren`t null Pin
PIEBALDconsult4-Oct-07 9:38
mvePIEBALDconsult4-Oct-07 9:38 
AnswerRe: How do we select only those columns that aren`t null Pin
Pete O'Hanlon4-Oct-07 10:48
mvePete O'Hanlon4-Oct-07 10:48 
AnswerRe: How do we select only those columns that aren`t null Pin
GuyThiebaut5-Oct-07 9:32
professionalGuyThiebaut5-Oct-07 9:32 
Questionhow to create a local search engine? Pin
LyndonJohn4-Oct-07 7:40
LyndonJohn4-Oct-07 7:40 
AnswerRe: how to create a local search engine? Pin
Joe4-Oct-07 8:43
Joe4-Oct-07 8:43 
JokeRe: how to create a local search engine? Pin
PIEBALDconsult4-Oct-07 9:46
mvePIEBALDconsult4-Oct-07 9:46 
GeneralRe: how to create a local search engine? Pin
LyndonJohn5-Oct-07 7:24
LyndonJohn5-Oct-07 7:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.