Results 1 to 2 of 2

Thread: Sql

  1. #1
    Join Date
    Dec 1969

    Default Sql

    Hi<BR><BR>I keep getting the following error:<BR><BR>Microsoft OLE DB Provider for ODBC Drivers error &#039;80040e07&#039; <BR><BR>[Microsoft][ODBC SQL Server Driver][SQL Server]The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value. <BR><BR>/iwanthits/placementadd.asp, line 29 <BR><BR>--------------------------------------<BR><BR>Here&#039;s my code:<BR>While addcounter &#060;= thecounter<BR><BR>theKeywordID = request.form("keywordID"& addcounter &"")<BR>sePosition = request.form("dir"& addcounter &"")<BR><BR> Set Conn = Server.CreateObject("ADODB.Connection")<BR> Set RS = Server.CreateObject("ADODB.Recordset")<BR><BR> strsql = "INSERT INTO keywordAnalysis (clientID, keywordID, searchengineID, AnalysisDate, sePosition, listed) " <BR> strsql = strsql + "VALUES (&#039;"& gotID &"&#039;, &#039;"& theKeywordID &"&#039;, &#039;"& sengID &"&#039;, Getdate(), &#039;"& sePosition &"&#039;, &#039;"& listed &"&#039;)"<BR><BR> Conn.open strconnect <BR> RS.open strsql, Conn <BR><BR> conn.close (LINE 29)<BR><BR> Set rs = Nothing<BR> set conn = nothing<BR> <BR> addcounter = addcounter + 1<BR>Wend<BR><BR>---------------------------------------<BR>The problem is I get that error on a few pages I imported data from an access database and the date was as follows 12/12/2001 not like 10/05/2002 17:34:59, is it this that is causing the problem?<BR><BR>Do I have to use Getdate()?<BR><BR>Help it really has messed up my site<BR><BR>Thanks<BR><BR>Gary

  2. #2
    Join Date
    Dec 1969

    Default RE: Sql

    I think i know what going on. it the old uk / us date thing. <BR><BR>try using date() as this will just get the date not the date and time. <BR><BR>what you will nedd to do is force the date reigon.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts