![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Generate Expressions in a dataset Hello there, I was wondering if anyone knows if there is an easy way to import expressions into my typed dataset from the original view/sql statement For example if I drag a view from the server explorer onto my dataset I would like it to import not just the caculated field but also the expression that creates the field. I think that an ORM mapper would probably do this for me but unfortunatly I am stuck with datasets ![]() Any ideas would be much appreciated, thank you John Sheppard |
My System Specs![]() |
| | #2 (permalink) |
| | RE: Generate Expressions in a dataset Hello, Have you tried to edit the text in the selectcommand for the created tableadapter, and copy from the definition for the view in sql server and paste on the selectcommand text ? Bye, -- Roger Tranchez MCTS ..NET 2005 and DB developer "John Sheppard" wrote: Quote: > Hello there, > > I was wondering if anyone knows if there is an easy way to import > expressions into my typed dataset from the original view/sql statement > > For example if I drag a view from the server explorer onto my dataset I > would like it to import not just the caculated field but also the expression > that creates the field. > > I think that an ORM mapper would probably do this for me but unfortunatly I > am stuck with datasets ![]() > > Any ideas would be much appreciated, thank you > John Sheppard > > > |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Generate Expressions in a dataset Thanks Roger, Yes I could do that, I just thought perhaps there might be a better way... The expression field isnt standard sql or anything either which makes things kind of difficult ![]() I think I was perhaps hoping too much that I could automate it.... "Roger Tranchez" <run1789@xxxxxx> wrote in message news:B8E1C261-3491-4D04-8FE3-FCA7924E852D@xxxxxx Quote: > Hello, > > Have you tried to edit the text in the selectcommand for the created > tableadapter, and copy from the definition for the view in sql server and > paste on the selectcommand text ? > > Bye, > > -- > Roger Tranchez > MCTS > .NET 2005 and DB developer > > > "John Sheppard" wrote: > Quote: >> Hello there, >> >> I was wondering if anyone knows if there is an easy way to import >> expressions into my typed dataset from the original view/sql statement >> >> For example if I drag a view from the server explorer onto my dataset I >> would like it to import not just the caculated field but also the >> expression >> that creates the field. >> >> I think that an ORM mapper would probably do this for me but unfortunatly >> I >> am stuck with datasets ![]() >> >> Any ideas would be much appreciated, thank you >> John Sheppard >> >> >> |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Generate Expressions in a dataset In fact, if you have a view in sql server you can import it directly, doing drag'n drop from server explorer to the design surface for your xsd file. It seems obvious that if the select statement is not into a view, user function or stored procedure, it is not possible to directly import it (you are trying to import a "piece of text", so what could be expected ?!) Bye, -- Roger Tranchez MCTS ..NET 2005 and DB developer "John Sheppard" wrote: Quote: > Thanks Roger, > > Yes I could do that, I just thought perhaps there might be a better way... > > The expression field isnt standard sql or anything either which makes things > kind of difficult ![]() > > I think I was perhaps hoping too much that I could automate it.... > > "Roger Tranchez" <run1789@xxxxxx> wrote in message > news:B8E1C261-3491-4D04-8FE3-FCA7924E852D@xxxxxx Quote: > > Hello, > > > > Have you tried to edit the text in the selectcommand for the created > > tableadapter, and copy from the definition for the view in sql server and > > paste on the selectcommand text ? > > > > Bye, > > > > -- > > Roger Tranchez > > MCTS > > .NET 2005 and DB developer > > > > > > "John Sheppard" wrote: > > Quote: > >> Hello there, > >> > >> I was wondering if anyone knows if there is an easy way to import > >> expressions into my typed dataset from the original view/sql statement > >> > >> For example if I drag a view from the server explorer onto my dataset I > >> would like it to import not just the caculated field but also the > >> expression > >> that creates the field. > >> > >> I think that an ORM mapper would probably do this for me but unfortunatly > >> I > >> am stuck with datasets ![]() > >> > >> Any ideas would be much appreciated, thank you > >> John Sheppard > >> > >> > >> > > |
My System Specs![]() |
| | #5 (permalink) |
| | Re: Generate Expressions in a dataset When I tried it it did not import the expression from the view..it just creates the field like its any other field...I thought perhaps it might try and import the underlying expression as well... It's double the work and error prone to make views that calculate then have to duplicate any expression into the dataset manually...seems silly... Thanks roger John "Roger Tranchez" <run1789@xxxxxx> wrote in message news:2F54E738-6309-486E-AB74-559C50F5A59A@xxxxxx Quote: > In fact, if you have a view in sql server you can import it directly, > doing > drag'n drop from server explorer to the design surface for your xsd file. > It > seems obvious that if the select statement is not into a view, user > function > or stored procedure, it is not possible to directly import it (you are > trying > to import a "piece of text", so what could be expected ?!) > > Bye, > > -- > Roger Tranchez > MCTS > .NET 2005 and DB developer > > > "John Sheppard" wrote: > Quote: >> Thanks Roger, >> >> Yes I could do that, I just thought perhaps there might be a better >> way... >> >> The expression field isnt standard sql or anything either which makes >> things >> kind of difficult ![]() >> >> I think I was perhaps hoping too much that I could automate it.... >> >> "Roger Tranchez" <run1789@xxxxxx> wrote in message >> news:B8E1C261-3491-4D04-8FE3-FCA7924E852D@xxxxxx Quote: >> > Hello, >> > >> > Have you tried to edit the text in the selectcommand for the created >> > tableadapter, and copy from the definition for the view in sql server >> > and >> > paste on the selectcommand text ? >> > >> > Bye, >> > >> > -- >> > Roger Tranchez >> > MCTS >> > .NET 2005 and DB developer >> > >> > >> > "John Sheppard" wrote: >> > >> >> Hello there, >> >> >> >> I was wondering if anyone knows if there is an easy way to import >> >> expressions into my typed dataset from the original view/sql statement >> >> >> >> For example if I drag a view from the server explorer onto my dataset >> >> I >> >> would like it to import not just the caculated field but also the >> >> expression >> >> that creates the field. >> >> >> >> I think that an ORM mapper would probably do this for me but >> >> unfortunatly >> >> I >> >> am stuck with datasets ![]() >> >> >> >> Any ideas would be much appreciated, thank you >> >> John Sheppard >> >> >> >> >> >> >> >> |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| $Variables into Regular expressions ?! help | PowerShell | |||
| Vista and Expressions web and browser | Browsers & Mail | |||
| New lines in regular expressions | PowerShell | |||
| How to work with regular expressions | PowerShell | |||
| Regular expressions | PowerShell | |||