Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getdate()
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Divers
Thread ID:
00537139
Message ID:
00537258
Vues:
12
You are trying to call the T-SQL function from VBScript, so it will not work. Either use all VBScript or all T-SQL.

T-SQL:
StrSql = StrSql & "T_date > dateadd(day, " & -1*dt & ", getdate()) & "...

Now the getdate will be executed on the SQL side.

-Dave


>hi
>
>I am unable to execute this code on my ASP page.The error is
>Type mismatch getdate.I am using SQL server.
>
>Earliar I had used access than now() for current date is working perfectly OK.
>
>if Request.Form("searchdate") <> 0 then
> dt = cint(Request.Form("searchdate"))
> StrSql = StrSql & "T_date > " & dateadd("d", "-dt", getdate()) & ") and ("
>End if
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform