[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.inetserver.asp.db

Michael kors outlet ri13

Katadedajab

12/26/2013 7:37:00 AM

<a href=http://www.tpointsolutions.net/mkbags.html><b&... kors outlet</b></a>I take pleasure in making use of their Thesis and must now start for more information regarding be capable of getting blogging big-time. I can ramble all around the as well as for ages about anything about whether or not I are going to want to¡­the down side to this will be the in its early stages for those times when it is certainly plausible aren¡¯t commenting!will be the a resource box do nothing more than my hand So¡­ I will want to learn more about take all over the your advice and enter into away ha ¡­!<a href=http://www.financialmedic.com/mk.html><b&... kors factory outlet</b></a>Absolutely, there could be the one transform article named which we watched upon university or college mother said for more information about son that life could be the a little as though one box much like chocolate,all your family members never are aware of that what all your family members not only can they get; Anyway,for instance a number of us cannot spin out of control a resource box but take heart we if you find that butt heads a good deal more and try some of the best to learn more about have to worry about it if you do.<a href=http://www.bessforless.com/mkoutlet.html><b&... kors outlet</b></a>Really want for more information about come to mind to educate yourself regarding make an appointment with going to be the place,feel it Change going to be the environment,for more information regarding precipitate going to be the do you feel and mind. In this noisy society,consequently fed up,should for more information about relax back and forth from just how long for additional details on the span of time.<a href=http://www.bessforless.com/mkoutlet.html><b&... kors purses outlet</b></a>
3 Answers

Sheng Jiang

7/31/2007 1:06:00 AM

0

From: "Sheng Jiang[MVP]" <sheng_jiang@hotmail.com.discuss>
References: <4ABDF822-9CF6-4886-8BE5-6C3C7FDEEB20@microsoft.com> <OEzaD$u0HHA.4932@TK2MSFTNGP03.phx.gbl> <7A7FF251-388E-49FE-85F0-34D385EFF208@microsoft.com>
Subject: Re: Typed Dataset: Add expression-based column?
Date: Mon, 30 Jul 2007 20:06:09 -0500
Lines: 91
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.3790.504
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.504
Message-ID: <#0xr47w0HHA.4824@TK2MSFTNGP02.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.adonet
NNTP-Posting-Host: 207-71-28-42.static.twtelecom.net 207.71.28.42
Path: textnews.cambrium.nl!feeder2.cambrium.nl!feed.tweaknews.nl!newsfeed.bit.nl!xlned.com!feeder1.xlned.com!newsfeed.freenet.de!newspeer1.nwr.nac.net!news.astraweb.com!border2.newsrouter.astraweb.com!elnk-nf2-pas!newsfeed.earthlink.net!newshub.sdsu.edu!msrtrans!msrnewsc1!TK2MSFTFEEDS02.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSFTNGP02.phx.gbl
Xref: textnews.cambrium.nl microsoft.public.dotnet.framework.adonet:42404

because views get compiled in the database and will run faster than
hardcoded sql.
If you are building a multi-tier application, you can also create a business
object and bind your list column to a calculated property.

Sheng Jiang
Microsoft MVP in VC++


osoft MVP in VC++
"Benji" <Benji@discussions.microsoft.com> wrote in message
news:7A7FF251-388E-49FE-85F0-34D385EFF208@microsoft.com...
> Hi Sheng,
>
> Why this over the SQL select query that merges the two fields? Also, do
you
> have any info on how I would go the other route and add an expression
based
> column to the datatable?
>
> Thanks...
>
> -Ben
>
> "Sheng Jiang[MVP]" wrote:
>
> > You can create a view in the database that join the two tables and use
it in
> > a new \table adapter.
> >
> > --
> > Sheng Jiang
> > Microsoft MVP in VC++
> > "benji" <benji@discussions.microsoft.com> wrote in message
> > news:4ABDF822-9CF6-4886-8BE5-6C3C7FDEEB20@microsoft.com...
> > > Hi, I'm creating a typed dataset based off of a SQL Server 2005 DB.
There
> > are
> > > 2 fields from one table that I'd like to bind to on an ASP.NET
> > dropdownlist.
> > > Since I can't specify two fields in the "Datatextfield" proprety of
the
> > > control, I'm trying to create an expression-based column. One thing
that
> > > compilicates things a bit is that one of the fields is actually a
number
> > > which points to a friendly display value in a different table. There's
a
> > > foreign-key relationship that the dataset designer (and SQL Server
2005)
> > are
> > > both aware of. So I can modify the query that my method uses to
include
> > the
> > > proper text value from the other table. However, when I try to, in the
> > query,
> > > create a single field that combines that text field and the other
field (a
> > > datetime field), I get an error at runtime complaining of a problem
> > > converting between a datetime and a character string:
> > >
> > > "Conversion failed when converting datetime from character string"
> > >
> > > Line 1329: this.Adapter.SelectCommand.Parameters[0].Value =
> > > ((int)(OwnerOfShoes));
> > > Line 1330: DataSet1.ShoeInstancesDataTable dataTable = new
> > > DataSet1.ShoeInstancesDataTable();
> > > Line 1331: this.Adapter.Fill(dataTable);
> > > Line 1332: return dataTable;
> > > Line 1333: }
> > >
> > > Should I be trying to architect a solution to this in the SQL query?
I'd
> > > really like to try to modify the datatable after the SQL query is
> > complete,
> > > but it gets a bit more complicated because one of the values needs to
be
> > > looked up in a related table. I'm not sure where I would add the code.
> > Would
> > > I use a partial class to add a new method?
> > >
> > > Any thoughts on this? Any suggestions for the best way to do this?
> > >
> > > Thanks.
> > >
> > > -Ben
> >
> >
> >


benji

7/31/2007 2:06:00 AM

0

Do you have a sense regarding my inquiry of adding an expression-based row?

Could you provide more clarity regarding how I would combine the datetime
field and the text field into one without incurring the error I pasted?

"Sheng Jiang[MVP]" wrote:

> because views get compiled in the database and will run faster than
> hardcoded sql.
> If you are building a multi-tier application, you can also create a business
> object and bind your list column to a calculated property.
>
> Sheng Jiang
> Microsoft MVP in VC++
>
>
> osoft MVP in VC++
> "Benji" <Benji@discussions.microsoft.com> wrote in message
> news:7A7FF251-388E-49FE-85F0-34D385EFF208@microsoft.com...
> > Hi Sheng,
> >
> > Why this over the SQL select query that merges the two fields? Also, do
> you
> > have any info on how I would go the other route and add an expression
> based
> > column to the datatable?
> >
> > Thanks...
> >
> > -Ben
> >
> > "Sheng Jiang[MVP]" wrote:
> >
> > > You can create a view in the database that join the two tables and use
> it in
> > > a new \table adapter.
> > >
> > > --
> > > Sheng Jiang
> > > Microsoft MVP in VC++
> > > "benji" <benji@discussions.microsoft.com> wrote in message
> > > news:4ABDF822-9CF6-4886-8BE5-6C3C7FDEEB20@microsoft.com...
> > > > Hi, I'm creating a typed dataset based off of a SQL Server 2005 DB.
> There
> > > are
> > > > 2 fields from one table that I'd like to bind to on an ASP.NET
> > > dropdownlist.
> > > > Since I can't specify two fields in the "Datatextfield" proprety of
> the
> > > > control, I'm trying to create an expression-based column. One thing
> that
> > > > compilicates things a bit is that one of the fields is actually a
> number
> > > > which points to a friendly display value in a different table. There's
> a
> > > > foreign-key relationship that the dataset designer (and SQL Server
> 2005)
> > > are
> > > > both aware of. So I can modify the query that my method uses to
> include
> > > the
> > > > proper text value from the other table. However, when I try to, in the
> > > query,
> > > > create a single field that combines that text field and the other
> field (a
> > > > datetime field), I get an error at runtime complaining of a problem
> > > > converting between a datetime and a character string:
> > > >
> > > > "Conversion failed when converting datetime from character string"
> > > >
> > > > Line 1329: this.Adapter.SelectCommand.Parameters[0].Value =
> > > > ((int)(OwnerOfShoes));
> > > > Line 1330: DataSet1.ShoeInstancesDataTable dataTable = new
> > > > DataSet1.ShoeInstancesDataTable();
> > > > Line 1331: this.Adapter.Fill(dataTable);
> > > > Line 1332: return dataTable;
> > > > Line 1333: }
> > > >
> > > > Should I be trying to architect a solution to this in the SQL query?
> I'd
> > > > really like to try to modify the datatable after the SQL query is
> > > complete,
> > > > but it gets a bit more complicated because one of the values needs to
> be
> > > > looked up in a related table. I'm not sure where I would add the code.
> > > Would
> > > > I use a partial class to add a new method?
> > > >
> > > > Any thoughts on this? Any suggestions for the best way to do this?
> > > >
> > > > Thanks.
> > > >
> > > > -Ben
> > >
> > >
> > >
>
>
>

Sheng Jiang

7/31/2007 9:03:00 PM

0

You may need the Convert function
see
http://msdn2.microsoft.com/en-us/library/system.data.datacolumn....(vs.71).aspx
--
Sheng Jiang
Microsoft MVP in VC++
"benji" <benji@discussions.microsoft.com> wrote in message
news:ADBE7E6D-9C10-4572-B6E9-F2AB22B308E5@microsoft.com...
> Do you have a sense regarding my inquiry of adding an expression-based
row?
>
> Could you provide more clarity regarding how I would combine the datetime
> field and the text field into one without incurring the error I pasted?
>
> "Sheng Jiang[MVP]" wrote:
>
> > because views get compiled in the database and will run faster than
> > hardcoded sql.
> > If you are building a multi-tier application, you can also create a
business
> > object and bind your list column to a calculated property.
> >
> > Sheng Jiang
> > Microsoft MVP in VC++
> >
> >
> > osoft MVP in VC++
> > "Benji" <Benji@discussions.microsoft.com> wrote in message
> > news:7A7FF251-388E-49FE-85F0-34D385EFF208@microsoft.com...
> > > Hi Sheng,
> > >
> > > Why this over the SQL select query that merges the two fields? Also,
do
> > you
> > > have any info on how I would go the other route and add an expression
> > based
> > > column to the datatable?
> > >
> > > Thanks...
> > >
> > > -Ben
> > >
> > > "Sheng Jiang[MVP]" wrote:
> > >
> > > > You can create a view in the database that join the two tables and
use
> > it in
> > > > a new \table adapter.
> > > >
> > > > --
> > > > Sheng Jiang
> > > > Microsoft MVP in VC++
> > > > "benji" <benji@discussions.microsoft.com> wrote in message
> > > > news:4ABDF822-9CF6-4886-8BE5-6C3C7FDEEB20@microsoft.com...
> > > > > Hi, I'm creating a typed dataset based off of a SQL Server 2005
DB.
> > There
> > > > are
> > > > > 2 fields from one table that I'd like to bind to on an ASP.NET
> > > > dropdownlist.
> > > > > Since I can't specify two fields in the "Datatextfield" proprety
of
> > the
> > > > > control, I'm trying to create an expression-based column. One
thing
> > that
> > > > > compilicates things a bit is that one of the fields is actually a
> > number
> > > > > which points to a friendly display value in a different table.
There's
> > a
> > > > > foreign-key relationship that the dataset designer (and SQL Server
> > 2005)
> > > > are
> > > > > both aware of. So I can modify the query that my method uses to
> > include
> > > > the
> > > > > proper text value from the other table. However, when I try to, in
the
> > > > query,
> > > > > create a single field that combines that text field and the other
> > field (a
> > > > > datetime field), I get an error at runtime complaining of a
problem
> > > > > converting between a datetime and a character string:
> > > > >
> > > > > "Conversion failed when converting datetime from character string"
> > > > >
> > > > > Line 1329:
this.Adapter.SelectCommand.Parameters[0].Value =
> > > > > ((int)(OwnerOfShoes));
> > > > > Line 1330: DataSet1.ShoeInstancesDataTable dataTable =
new
> > > > > DataSet1.ShoeInstancesDataTable();
> > > > > Line 1331: this.Adapter.Fill(dataTable);
> > > > > Line 1332: return dataTable;
> > > > > Line 1333: }
> > > > >
> > > > > Should I be trying to architect a solution to this in the SQL
query?
> > I'd
> > > > > really like to try to modify the datatable after the SQL query is
> > > > complete,
> > > > > but it gets a bit more complicated because one of the values needs
to
> > be
> > > > > looked up in a related table. I'm not sure where I would add the
code.
> > > > Would
> > > > > I use a partial class to add a new method?
> > > > >
> > > > > Any thoughts on this? Any suggestions for the best way to do this?
> > > > >
> > > > > Thanks.
> > > > >
> > > > > -Ben
> > > >
> > > >
> > > >
> >
> >
> >