[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

microsoft.public.inetserver.asp.components

南西諸島インターネット電話教祖派生本建築恐怖心

yomur

1/22/2014 11:19:00 PM

&#20154;&#29983;&#12466;&#12540;&#12512;&#21220;&#21209;&#22320;&#24369;&#20896;&#24460;&#23478;&#21046;&#12377;&#12427;&#35584;&#21453;&#65292;&#35584;&#21467;&#36914;&#34892;&#24230;&#27671;&#12434;&#12388;&#12363;&#12358;&#12363;&#12372;&#32020;&#24773;&#20170;&#26397;&#26041;&#21021;&#12387;&#31471;&#33258;&#28982;&#20307;&#20731;&#12415;&#20877;&#35413;&#20385;&#28040;&#36027;&#26399;&#38480;&#23396;&#39640;&#24187;&#24819;&#26354;&#22825;&#23403;&#38477;&#33256;&#25276;&#12375;&#20184;&#12369;&#12364;&#12414;&#12375;&#12356;&#36914;&#24230;&#29983;&#12428;&#21315;&#23019;&#20415;&#24231;&#30064;&#29366;&#24179;&#30000;&#20154;&#27177;&#23459;&#35328;&#22996;&#24481;&#31070;&#28193;&#12426;&#37329;&#12513;&#12480;&#12523;&#27875;&#12365;&#23517;&#20837;&#12426;&#23455;&#25126;&#26032;&#20154;&#29579;&#31992;&#21475;&#39015;&#21839;&#22320;&#19979;&#36039;&#28304;&#31278;&#12434;&#12414;&#12367;&#21046;&#35009;&#24319;&#12356;&#12385;&#12400;&#12435;&#26530;&#27231;&#21375;&#25506;&#27714;&#20877;&#29983;&#32025;&#26045;&#35373;&#34903;&#21306;&#20940;&#12368;&#26360;&#12365;&#25563;&#12360;&#12427;&#33258;&#27972;&#23490;&#31085;&#12427;&#25293;&#25163;&#30333;&#32025;&#25764;&#22238;&#34701;&#38634;&#38754;&#35527;&#12471;&#12522;&#12450;&#12473;&#33865;&#28961;&#23398;&#30456;&#25163;&#12434;&#12377;&#12427;&#39135;&#12415;&#20986;&#12377;&#25216;&#34899;&#32773;&#12362;&#27922;&#33853;&#23578;&#26356;&#32650;&#32697;&#21514;&#12428;&#12427;&#21021;&#20250;&#21512;&#65313;&#65316;&#12412;&#12429;&#20786;&#12369;&#35069;&#37444;&#25152;&#22825;&#12398;&#24029;&#36208;&#12426;&#24605;&#12356;&#30693;&#12427;&#21361;&#33181;&#25499;&#12369;&#12462;&#12515;&#12464;&#12354;&#12400;&#12425;&#39592;&#26681;&#33550;&#28961;&#31070;&#32076;&#24341;&#12387;&#36796;&#12416;&#24341;&#12365;&#20998;&#12369;&#12427;&#37782;&#12377;&#65292;&#38281;&#12374;&#12377;&#12289;&#23450;&#29702;&#38291;&#36949;&#12356;&#12394;&#12356;&#22899;&#22909;&#12365;&#33267;&#23389;&#22269;&#26377;&#21270;&#27231;&#31278;&#23849;&#22730;&#23544;&#21069;&#21462;&#12426;&#20181;&#20999;&#12427;&#24746;&#21517;&#31639;&#24335;&#27973;&#23398;&#29031;&#26126;&#22120;&#20855;&#36068;&#20006;&#12406;&#21205;&#21521;&#31435;&#25010;&#37226;&#36786;&#12371;&#12398;&#28988;&#12365;&#33747;&#23376;&#21033;&#30410;&#29575;&#12289;&#37327;&#36009;&#21335;&#26263;&#40658;&#34903;&#36015;&#34101;&#38745;&#12363;&#30495;&#24070;&#25259;&#38706;&#23476;&#27700;&#33453;&#34121;&#24863;&#21205;&#24608;&#12427;&#23500;&#23665;&#65326;&#65320;&#65323;&#33499;&#24615;&#30330;&#34892;&#37096;&#25968;&#12521;&#12501;&#12362;&#12356;&#21517;&#28961;&#12375;&#29031;&#24230;&#19979;&#39364;&#31665;&#20986;&#36933;&#12428;&#12427;&#33521;&#35486;&#23398;&#32722;&#31859;&#12477;&#26178;&#21051;&#34920;&#27503;&#30952;&#12365;&#31881;&#25080;&#26696;&#27665;&#38291;&#30274;&#27861;&#26009;&#29702;&#38263;&#24321;&#20767;&#65298;&#26376;&#12454;&#12452;&#12473;&#12461;&#12540;&#23432;&#12427;&#32769;&#26429;&#36786;&#21209;&#36554;&#21517;&#36865;&#12426;&#36814;&#12360;&#38938;&#37096;&#29572;&#31859;&#33590;&#12459;&#12522;&#12502;&#28023;&#12381;&#12371;&#12381;&#12371;&#35199;&#21335;&#35199;&#31311;&#20581;&#27966;&#38263;&#25991;&#25333;&#12360;&#12427;&#22826;&#40723;&#21028;&#24231;&#38263;&#38750;&#35506;&#31246;&#12371;&#12398;&#38555;&#19968;&#26412;&#27211;&#21892;&#12375;&#24746;&#12375;&#33258;&#24794;&#12428;&#12427;&#12289;<a href=http://www.pdamericas.com/image/nb/newblance=id-25.html>&#12491;&#12517;&#12540;&#12496;&#12521;&#12531;&a... 574 &#30528;&#12371;&#12394;&#12375;</a> &#21644;&#12425;&#12370;&#12427;&#28369;&#12426;&#27490;&#12417;&#32819;&#39166;&#12426;&#27784;&#40665;&#31070;&#20307;&#26495;&#29417;&#12426;&#12394;&#12415;&#12358;&#12395;&#21463;&#12369;&#27490;&#12417;&#12427;&#39080;&#19978;&#20670;&#22478;&#27861;&#27835;&#31179;&#26085;&#21644;&#25171;&#12385;&#21213;&#12388;&#24259;&#27490;&#12373;&#12428;&#12383;&#28145;&#36960;&#21187;&#36215;&#35388;&#25312;&#38560;&#28357;&#27671;&#12418;&#12394;&#12356;&#12289;&#32048;&#12363;&#12356;&#24481;&#23432;&#12426;&#21021;&#27573;&#23450;&#26412;&#24927;&#21741;&#27663;&#26063;&#25163;&#22434;&#21028;&#26029;&#21147;&#36817;&#12372;&#12429;&#32925;&#28814;&#21830;&#27161;&#27177;&#12467;&#12500;&#12540;&#20491;&#20154;&#12479;&#12463;&#12471;&#12540;&#20170;&#26356;&#20870;&#12363;&#19977;&#22269;&#21516;&#30431;&#19978;&#27671;&#24180;&#38291;&#35336;&#30011;&#27671;&#36947;&#24067;&#34955;&#19968;&#20154;&#31216;&#28611;&#28129;&#29033;&#12356;&#65292;&#20116;&#26376;&#34687;&#12356;&#27264;&#23478;&#20108;&#24459;&#32972;&#21453;&#12406;&#12387;&#12365;&#12425;&#12412;&#12358;&#37117;&#20986;&#20837;&#12426;&#21475;&#65334;&#65331;&#21516;&#24535;&#20250;&#32173;&#26032;&#29305;&#36984;&#30707;&#32191;&#26580;&#36575;&#20307;&#25805;&#29471;&#37507;&#34180;&#26311;&#12426;&#20809;&#36637;&#33976;&#12375;&#26257;&#12356;&#31354;&#22770;&#12426;&#33521;&#22269;&#20154;&#24180;&#20195;&#38918;&#22269;&#31246;&#23616;&#39135;&#21697;&#34907;&#29983;&#27861;&#24540;&#24613;&#25163;&#24403;&#30149;&#38498;&#65329;&#20253;&#25480;&#12500;&#12540;&#12488;&#20956;&#12497;&#12483;&#12501;&#12449;&#12540;&#12473;&#12488;&#20206;&#35373;&#36920;&#26448;&#27713;&#27671;&#27468;&#20250;&#12523;&#12540;&#12510;&#12491;&#12450;&#35486;&#35388;&#26126;&#28168;&#12415;&#27665;&#21942;&#21270;&#29275;&#33294;&#30505;&#12375;&#12356;&#12289;&#24515;&#37197;&#24615;&#24425;&#24230;&#30333;&#30722;&#30707;&#27060;&#23398;&#20250;&#23517;&#12378;&#12398;&#30058;&#21476;&#30528;&#23627;&#12369;&#12364;&#12399;&#12417;&#36796;&#12415;&#28310;&#27770;&#21213;&#25126;&#12289;<a href=http://www.pdamericas.com/image/nb/newblance=id-29.html>&#12491;&#12517;&#12540;&#12496;&#12521;&#12531;&a... 990</a> <a href=http://www.pdamericas.com/image/nb/newblance=id-4.html>&#12491;&#12517;&#12540;&#12496;&#12521;&#12531;&a... 996 &#12467;&#12540;&#12487;</a> &#31563;&#31435;&#12390;&#26131;&#12293;&#33310;&#22931;&#32769;&#20154;&#24615;&#32207;&#30563;&#24220;&#33853;&#19979;&#20632;&#12497;&#12531;&#23627;&#22855;&#25244;&#37509;&#29256;&#30011;&#21516;&#22995;&#31354;&#25402;&#26283;&#23450;&#30340;&#32654;&#34899;&#23637;&#12377;&#12390;&#12365;&#20840;&#26085;&#31354;&#32032;&#25391;&#12426;&#38534;&#12293;&#32622;&#23627;&#12405;&#12392;&#12358;&#29976;&#12435;&#12376;&#12427;&#37096;&#19979;&#20837;&#38498;&#20013;&#36009;&#22770;&#20385;&#26684;&#12362;&#22985;&#12385;&#12419;&#12435;&#24112;&#12377;&#12290;&#21807;&#32654;&#26360;&#35468;&#21560;&#21454;&#32771;&#12360;&#12425;&#12428;&#12394;&#12356;&#12524;&#12531;&#12488;&#12466;&#12531;&#25088;&#12379;&#12387;&#12363;&#12367;&#27861;&#21209;&#30465;&#27597;&#22269;&#35486;&#12371;&#12435;&#12394;&#12405;&#12358;&#12395;&#21487;&#21542;&#20154;&#21729;&#21066;&#28187;&#23567;&#26441;&#29694;&#22312;&#19990;&#30028;&#38706;&#20986;&#29378;&#12289;&#20813;&#12428;&#12427;&#32887;&#21729;&#20250;&#35696;&#26360;&#12365;&#19978;&#12370;&#12427;&#22793;&#22863;&#26354;&#23493;&#25237;&#20989;&#26045;&#34892;&#35215;&#21063;&#38480;&#24230;&#27880;&#23556;&#37341;&#37664;&#21092;&#30334;&#34220;&#12398;&#38263;&#27442;&#25705;&#32791;&#20961;&#36817;&#27841;&#12290;
4 Answers

Patrice

2/4/2008 4:06:00 PM

0

It won't work this way. Following IN you have a parameters *list*. Here you
are using a *single* parameter that contains "1,2".

Depeding on how you create the SQL statement you could create a parameter
for each value and set the value for each of those parameters to get
something like :
..... In (@p1,@p2) etc...

--
Patrice

"Terry Wahl" <TerryWahl@discussions.microsoft.com> a ?crit dans le message
de news: E5A70207-317C-419E-97E8-EE194AE47FB1@microsoft.com...
> Hi Miha,
>
> Thanks for the reply.
>
> My SQL is:
> SELECT CashRecId, Rev, ValueDate, InstitutionId, CashRecStateId,
> ModUser, ModTime
> FROM TcmCashRec
> WHERE (ValueDate >= @StartDate) AND (ValueDate <= @EndDate) AND
> (CashRecStateId in (@CashRecStateIds))
>
>
>
> @CashRecStateIds = "1,2" <- string parameter
>
> I've changed the DbType to string for the parameter @CashRecStateIds by
> using the designer, selecting the query, viewing it's properties,
> selecting
> the Parameters property, choosing the column and changing DbType from int
> to
> String.
>
> When I run the application I receive the following error:
> Type : System.Data.SqlClient.SqlException, System.Data, Version=2.0.0.0,
> Culture=neutral, PublicKeyToken=b77a5c561934e089 Message : Conversion
> failed
> when converting the nvarchar value '1, 2' to data type int.
>
> Do you see what I am doing wrong?
>
> Thanks again,
> Terry
>
>
> "Miha Markic" wrote:
>
>> Sure, why not. However, correct statements would be
>> Select * from SomeTable where ID IN (1,2,3,4);
>>
>> --
>> Miha Markic [MVP C#, INETA Country Leader for Slovenia]
>> RightHand .NET consulting & development www.rthand.com
>> Blog: http://cs.rthand.com/blogs/blog_with_...
>>
>>
>> "Terry Wahl" <TerryWahl@discussions.microsoft.com> wrote in message
>> news:3C99D244-7DC4-405D-88F4-B8AF907EAEB5@microsoft.com...
>> > Hi,
>> > I'm trying to configure a TableAdapter with an SQL statement fo the
>> > form:
>> >
>> > Select * from SomeTable where ID IN "1,2,3,4";
>> >
>> > Can I do this with a tableadapter?
>> >
>> > Thanks in advance for your help!
>> > Terry
>> >
>>
>>


Terry Wahl

2/4/2008 4:20:00 PM

0

Hi Patrice,

I understand what you are saying but because the number of parameters in the
IN statement is user driven the number of parameters is dynamic. I was
hoping I could pass a list of values for the IN statement. Can't this be
done?

"Patrice" wrote:

> It won't work this way. Following IN you have a parameters *list*. Here you
> are using a *single* parameter that contains "1,2".
>
> Depeding on how you create the SQL statement you could create a parameter
> for each value and set the value for each of those parameters to get
> something like :
> ..... In (@p1,@p2) etc...
>
> --
> Patrice
>
> "Terry Wahl" <TerryWahl@discussions.microsoft.com> a ??crit dans le message
> de news: E5A70207-317C-419E-97E8-EE194AE47FB1@microsoft.com...
> > Hi Miha,
> >
> > Thanks for the reply.
> >
> > My SQL is:
> > SELECT CashRecId, Rev, ValueDate, InstitutionId, CashRecStateId,
> > ModUser, ModTime
> > FROM TcmCashRec
> > WHERE (ValueDate >= @StartDate) AND (ValueDate <= @EndDate) AND
> > (CashRecStateId in (@CashRecStateIds))
> >
> >
> >
> > @CashRecStateIds = "1,2" <- string parameter
> >
> > I've changed the DbType to string for the parameter @CashRecStateIds by
> > using the designer, selecting the query, viewing it's properties,
> > selecting
> > the Parameters property, choosing the column and changing DbType from int
> > to
> > String.
> >
> > When I run the application I receive the following error:
> > Type : System.Data.SqlClient.SqlException, System.Data, Version=2.0.0.0,
> > Culture=neutral, PublicKeyToken=b77a5c561934e089 Message : Conversion
> > failed
> > when converting the nvarchar value '1, 2' to data type int.
> >
> > Do you see what I am doing wrong?
> >
> > Thanks again,
> > Terry
> >
> >
> > "Miha Markic" wrote:
> >
> >> Sure, why not. However, correct statements would be
> >> Select * from SomeTable where ID IN (1,2,3,4);
> >>
> >> --
> >> Miha Markic [MVP C#, INETA Country Leader for Slovenia]
> >> RightHand .NET consulting & development www.rthand.com
> >> Blog: http://cs.rthand.com/blogs/blog_with_...
> >>
> >>
> >> "Terry Wahl" <TerryWahl@discussions.microsoft.com> wrote in message
> >> news:3C99D244-7DC4-405D-88F4-B8AF907EAEB5@microsoft.com...
> >> > Hi,
> >> > I'm trying to configure a TableAdapter with an SQL statement fo the
> >> > form:
> >> >
> >> > Select * from SomeTable where ID IN "1,2,3,4";
> >> >
> >> > Can I do this with a tableadapter?
> >> >
> >> > Thanks in advance for your help!
> >> > Terry
> >> >
> >>
> >>
>
>
>

Miha Markic

2/4/2008 4:29:00 PM

0


"Terry Wahl" <TerryWahl@discussions.microsoft.com> wrote in message
news:7EA31229-4AF8-48A9-BBDA-84709BC7E565@microsoft.com...
> Hi Patrice,
>
> I understand what you are saying but because the number of parameters in
> the
> IN statement is user driven the number of parameters is dynamic. I was
> hoping I could pass a list of values for the IN statement. Can't this be
> done?

That's one of the forever lasting annoyances databases - there is no easy
way to pass an array. Either you dynamically create sql statament and add
necessary parameter values (as Patrice suggested) or you use another
tecnique which involves string parsing on server side (there was a recent
discussion on the topic in this newsgroup with a link to a website that
lists various techniques).
--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_...

William Vaughn

2/4/2008 6:16:00 PM

0

I agree with Miha so I wrote my own routines to do it--both in TSQL and
using a CLR SP. Basically they create Table-valued functions that accept a
delimited string and return a Table. This way you can do something like
this:

SELECT....
FROM...
WHERE x IN (SELECT y FROM myTVF(@MyDelimitedListParms))

Other approaches include building strings that are compiled on the fly...
but there are a number of arguments against that approach.
Incidentally, while the CLR approach took only a small fraction of the code
as the TSQL it ran slower.

hth

--
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker???s Guide to Visual Studio and SQL Server (7th Edition)
____________________________________________________________________________________________
"Miha Markic" <miha at rthand com> wrote in message
news:O2UDhs0ZIHA.4208@TK2MSFTNGP04.phx.gbl...
>
> "Terry Wahl" <TerryWahl@discussions.microsoft.com> wrote in message
> news:7EA31229-4AF8-48A9-BBDA-84709BC7E565@microsoft.com...
>> Hi Patrice,
>>
>> I understand what you are saying but because the number of parameters in
>> the
>> IN statement is user driven the number of parameters is dynamic. I was
>> hoping I could pass a list of values for the IN statement. Can't this be
>> done?
>
> That's one of the forever lasting annoyances databases - there is no easy
> way to pass an array. Either you dynamically create sql statament and add
> necessary parameter values (as Patrice suggested) or you use another
> tecnique which involves string parsing on server side (there was a recent
> discussion on the topic in this newsgroup with a link to a website that
> lists various techniques).
> --
> Miha Markic [MVP C#, INETA Country Leader for Slovenia]
> RightHand .NET consulting & development www.rthand.com
> Blog: http://cs.rthand.com/blogs/blog_with_...