Hi thanks damber,
I have looked at the information you have given me. I am aware how to create a vb function. thanks
Think its probably better to write a stored procedure and do the date manipulation bit within the proc therefore no need to change the Local Settings for the whole site...
Hi damber,
I have never heared of an inbuilt asp format function!
response.write(Format(Now, "dd-mm-yyyy hh:nn:ss"))
When i run this i get back. Type mismatch: 'Format'
-Gus
Hi DNG,
I know i probably been a bit dim but i tried this as i thought Format must be a sQL command:
[code]
INSERT INTO offer(OfferCode, OfferPercent, OfferStartDate, OfferFinishDate, OfferDescription) VALUES ('24082005-174507',1, Format(04/08/2005 17:45:07, dd-mm-yyyy hh:nn:ss)...
Hi when i run this sql i get this error
The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.
The statement has been terminated.
The ASP
("INSERT INTO offer(OfferCode, OfferPercent, OfferStartDate, OfferFinishDate, OfferDescription) VALUES...
Hi thanks for your input.
I decided to declare the variable on each page instead using a include file which is attached on all pages.
Thanks for your time.
Kind regards
Angus
-Gus
Hi i have a function which i am including on multiple ASP pages via an include file and is been called on multiple pages.
However i wish to run a little bit of logic if a particular variable exists. however i dont want to have to go through and declare the varible on all my pages or remove the...
Hi thanks for all your help. Yes SearchResultID was unique not searchstr.
I have solved my own issue i tryed SQLBills method but could not get it to work. So i experimented with the Group By clause. This seems to do the job for me.
ie. bring back the last 10 Unique SearchStr records.
SELECT...
Hi see this artical from microsoft
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_foxhelp9/html
A SELECT … DISTINCT … ORDER BY command will generate an error if the specified ORDER BY field is not in the SELECT field list.
This is my problem.
thanks
-Gus
Hi,
No i get an error Invalid columm name SearchResultID?:
SELECT TOP 10 *
FROM (SELECT DISTINCT (SearchStr)
FROM SearchResult) SearchResult
WHERE (SearchBroad = 0) AND (Hits > 5)
ORDER BY SearchResultID
-Gus
Hi i wish to only display the top 10 distinct 'SearchStr'.
How can i do this as i have to display the 'SearchResultid' in the Select statment to get the OrderBy to function.
This is my current SQL:
SELECT DISTINCT TOP 10 SearchStr, SearchResultID
FROM SearchResult
WHERE...
Hi Sheco,
Thanks for your input i swear i tryed renaming the cmd object similar to what you recommend above and it did not work yesterday. I try it again today and it works no problems.
thanks
Angus
-Gus
Hi DNG,
adExecuteNoRecords just tells the database that we are not going to be returning a recordset. So dont bother getting ready the available memory to create the recordset.
removing it makes no difference for this query.
thanks
-Gus
It prints out done1 but not done2 printed in red. Any ideas why i should see done1 but not done2 on the screen
Thanks
response.write "done1!" 'it gets here!
Set cmd = Server.CreateObject("ADODB.Command")
response.write "done2!" 'it does not get here
cmd.ActiveConnection = gConn...
Hi i have an issue calling stored proc from ASP i can run this proc fine in Query Analyser. For some reason it wont run in my ASP. There is no error message it just wont update my table as i would expect. I have done some response.write in the code so I know its getting to this point. any...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.