PC Review


Reply
Thread Tools Rate Thread

Adding a field with an expression in a Dataset

 
 
Woody Splawn
Guest
Posts: n/a
 
      17th Jul 2003
I may have a mis-understanding of how expressions are intended to be used in
a DataSet. I don't know, it appears that you can take a dataset and add a
field to it that contains an expression from within a DataSet.xsd file, I
mean from within the design window, the one with the yellow background. I
would like to, for example, add a name field to a form that contains an
expression of something like Fname + lname.

So... I have a form. I created a dataset from within the form using a data
adapter (generate dataset) It exists in the component tray at the bottom of
the form and there is a reference to it in the Solution Explorer. I double
click on it in Solution Explorer to acces the design window. At the bottom
of the grid I add a row. I call it an element, name it "name" and call it a
string. In the Expression property I type in "Fname + ' '+Lname".

When I save the .xsd file, it no longer shows up in my component tray of the
form and the form is no longer functional.

Did I mention that I may have a misunderstanding of how expressions are
intended to be used? <g>
Could someone tell me if Expressions are designed to be used in this way?
If so, what do I need to do differently. If not, is there an easy way to
add a calculated field to a form that contains concatenated information like
fname/Lname?



 
Reply With Quote
 
 
 
 
Manpreet Juneja \(GrapeCity\)
Guest
Posts: n/a
 
      18th Jul 2003
Hello Woody,

I was able to replicate your problem. The problem is occurring because
you're passing the value for the 'Expression' property in quotes.
Set the Expression property of the element to Fname + ' '+Lname (don't
enclose it in double quotes). This would solve the problem.

Thanks
Manpreet

"Woody Splawn" <(E-Mail Removed)> wrote in message
news:#(E-Mail Removed)...
> I may have a mis-understanding of how expressions are intended to be used

in
> a DataSet. I don't know, it appears that you can take a dataset and add a
> field to it that contains an expression from within a DataSet.xsd file, I
> mean from within the design window, the one with the yellow background. I
> would like to, for example, add a name field to a form that contains an
> expression of something like Fname + lname.
>
> So... I have a form. I created a dataset from within the form using a

data
> adapter (generate dataset) It exists in the component tray at the bottom

of
> the form and there is a reference to it in the Solution Explorer. I

double
> click on it in Solution Explorer to acces the design window. At the

bottom
> of the grid I add a row. I call it an element, name it "name" and call it

a
> string. In the Expression property I type in "Fname + ' '+Lname".
>
> When I save the .xsd file, it no longer shows up in my component tray of

the
> form and the form is no longer functional.
>
> Did I mention that I may have a misunderstanding of how expressions are
> intended to be used? <g>
> Could someone tell me if Expressions are designed to be used in this way?
> If so, what do I need to do differently. If not, is there an easy way to
> add a calculated field to a form that contains concatenated information

like
> fname/Lname?
>
>
>



 
Reply With Quote
 
Woody Splawn
Guest
Posts: n/a
 
      18th Jul 2003
That made the difference. Thank you.



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
Problem Adding a field based on expression ttp Microsoft Access Queries 1 14th Mar 2009 04:12 AM
Problems adding a calculated field to an existing dataset. =?Utf-8?B?Qi4gQ2hlcm5pY2s=?= Microsoft ADO .NET 3 19th Nov 2007 02:23 PM
DataSet Designer/adding multiple tables to a dataset/ how? =?Utf-8?B?Q3VydGlz?= Microsoft ADO .NET 1 21st Aug 2006 02:09 PM
Adding Field with an Expression =?Utf-8?B?QXVkaXRvckNNTQ==?= Microsoft Access Queries 3 18th Jan 2006 07:49 PM
DataSet.Merge with Column.Expression. expression not =?Utf-8?B?R2llZHJpdXM=?= Microsoft ADO .NET 4 12th Jan 2005 09:45 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:20 AM.