SQL in ASP: How Much?
am 29.01.2005 21:33:01 von James101
My web-packaged training piece (in Authorware) sends user data to an Access
database via an ASP page. I have recently increased the number of variables
sent to the database from 25 to 35. Each variable can be a string of 10-15
characters or a numberical value of 2 digits.
The number of characters in the SQL UPDATE command used in the ASP page has
increased to about 1000 (including spaces).
Do I have too many variables or too many characters in the SQL UPDATE
command? I could consolidate the data sent and use fewer variables. I could
reduce the characters in the SQL UPDATE command by eliminating spaces and
using shorter labels for variables. First, though, I would like to determine
if these actions are needed.
Thanks.
Jim Bowman
Re: SQL in ASP: How Much?
am 29.01.2005 22:28:43 von Bob Lehmann
>> First, though, I would like to determine if these actions are needed.
There's no way for us to know. Do you think they're needed?
Shortening variable names will do nothing. Doing silly "optimizations" like
removing spaces only result in less maintainable code.
Bob Lehmann
"James_101" wrote in message
news:2A0011BB-3AB6-4FC7-AAAB-155EF813153A@microsoft.com...
> My web-packaged training piece (in Authorware) sends user data to an
Access
> database via an ASP page. I have recently increased the number of
variables
> sent to the database from 25 to 35. Each variable can be a string of
10-15
> characters or a numberical value of 2 digits.
>
> The number of characters in the SQL UPDATE command used in the ASP page
has
> increased to about 1000 (including spaces).
>
> Do I have too many variables or too many characters in the SQL UPDATE
> command? I could consolidate the data sent and use fewer variables. I
could
> reduce the characters in the SQL UPDATE command by eliminating spaces and
> using shorter labels for variables. First, though, I would like to
determine
> if these actions are needed.
>
> Thanks.
>
> Jim Bowman
Re: SQL in ASP: How Much?
am 30.01.2005 14:31:54 von reb01501
James_101 wrote:
> My web-packaged training piece (in Authorware) sends user data to an
> Access database via an ASP page. I have recently increased the
> number of variables sent to the database from 25 to 35. Each
> variable can be a string of 10-15 characters or a numberical value of
> 2 digits.
>
> The number of characters in the SQL UPDATE command used in the ASP
> page has increased to about 1000 (including spaces).
>
> Do I have too many variables or too many characters in the SQL UPDATE
> command? I could consolidate the data sent and use fewer variables.
> I could reduce the characters in the SQL UPDATE command by
> eliminating spaces and using shorter labels for variables. First,
> though, I would like to determine if these actions are needed.
>
Use saved parameter queries instead of dynamic sql:
http://www.google.com/groups?selm=eETTdnvFDHA.1660%40TK2MSFT NGP10.phx.gbl&oe=UTF-8&output=gplain
http://groups-beta.google.com/group/microsoft.public.inetser ver.asp.db/msg/c966c9c8eb98f331?hl=en&lr=&ie=UTF-8&c2coff=1
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Re: SQL in ASP: How Much?
am 31.01.2005 17:46:51 von Mark Schupp
>Shortening variable names will do nothing. Doing silly "optimizations" like
>removing spaces only result in less maintainable code.
Unless the spaces are in table and column names in which case they should be
removed if possible.
For the OP's original question. I don't think 1000 characters in a SQL
statement is excessive. It might be possible to shorten it by only including
those columns that require an update (would need to keep track of edited
fields in the form).
--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Bob Lehmann" wrote in message
news:%23peM5jkBFHA.3504@TK2MSFTNGP12.phx.gbl...
> >> First, though, I would like to determine if these actions are needed.
> There's no way for us to know. Do you think they're needed?
>
> Shortening variable names will do nothing. Doing silly "optimizations"
like
> removing spaces only result in less maintainable code.
>
> Bob Lehmann
>
> "James_101" wrote in message
> news:2A0011BB-3AB6-4FC7-AAAB-155EF813153A@microsoft.com...
> > My web-packaged training piece (in Authorware) sends user data to an
> Access
> > database via an ASP page. I have recently increased the number of
> variables
> > sent to the database from 25 to 35. Each variable can be a string of
> 10-15
> > characters or a numberical value of 2 digits.
> >
> > The number of characters in the SQL UPDATE command used in the ASP page
> has
> > increased to about 1000 (including spaces).
> >
> > Do I have too many variables or too many characters in the SQL UPDATE
> > command? I could consolidate the data sent and use fewer variables. I
> could
> > reduce the characters in the SQL UPDATE command by eliminating spaces
and
> > using shorter labels for variables. First, though, I would like to
> determine
> > if these actions are needed.
> >
> > Thanks.
> >
> > Jim Bowman
>
>