|
 |
asp_database_setup thread: Re: asp_database_setup digest: May 02, 2001
Message #1 by "Mail List Management Account" <lists@m...> on Thu, 03 May 2001 05:31:51 -0400
|
|
Any help is appreciated.
Below is the code I am using to extract some records. It works fine with
the exception of th SYOR variable, which is a number (2001 in this case.)
*****
pq.open "select * from logon where fn='" & fn & "' and mor='" & smor & "'
and yor='" & syor & "' order by value and mor and yor desc"
****
I am getting the ever-popular datatype mismatch error.
My problem is that I cannot figure our how to use the ORDER BY clause
with the cint(syor) variable at the end of the sql statement. For
example,
****
pq.open "select * from logon where fn='" & fn & '" and mor-'" & smor & "'
and yor=" &cint(syor) ------ Does anyone know what I need to put here or
change in the example above to make the ORDER BY statement work?
****
Thanks in advance...
Bill S.
===================================
Custom Web Application Programming
Contact: was@i...
===================================
Your Message Here
20,000 messages for $39.00
Contact: lists@m...
===================================
Message #2 by "Ken Schaefer" <ken@a...> on Thu, 3 May 2001 23:03:39 +1000
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: Any help is appreciated.
:
: Below is the code I am using to extract some records. It works fine with
: the exception of th SYOR variable, which is a number (2001 in this case.)
:
: *****
: pq.open "select * from logon where fn='" & fn & "' and mor='" & smor & "'
: and yor='" & syor & "' order by value and mor and yor desc"
: ****
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You are using ORDER BY incorrect:
SELECT *
FROM Logon
WHERE
fn = 'fn'
AND
mor = 'smor'
AND
yor = 'syor'
ORDER BY Value ASC, Mor ASC, Yor DESC
will work
SQL tutorial here:
http://w3.one.net/~jhoffman/sqltut.htm
Cheers
Ken
Message #3 by "Mail List Management Account" <lists@m...> on Sat, 05 May 2001 02:17:54 -0400
|
|
Regarding the "Cannot Update" error, the ISUR acct had full rights during
the testing and the Everyone acct had read only. Duhh....thanks for
being kind in your responses.
Bill S.
|
|
 |