it still not working !!!!!

Results 1 to 3 of 3

Thread: it still not working !!!!!

  1. #1
    bobby Guest

    Default it still not working !!!!!

    Hi all <BR>im trying to send a date to my sql server <BR><BR>I have a html form sending the data to a asp script in the format of 10102000<BR> all separate stings<BR><BR>The sql server is set up to accept small dates <BR>But when sending the form I get<BR><BR>The conversion of CHAR to SMALLDATETIME resulted in a SMALLDATETIME value out of range<BR><BR><BR>Asp - <BR>Rdates = Request.Form("Web_Day") & "/" &_<BR> Request.Form("Web_Month")& "/" &_<BR> Request.Form("Web_Year")<BR>Rweek = Datevalue(rdates)<BR><BR>~~<BR>for the insert<BR>"&#039,&#039" & Rweek &_<BR><BR>~~<BR><BR>Question do I need some #&#039s on the insert??<BR>

  2. #2
    Garth Guest

    Default RE: it still not working !!!!!

    This seems to work.<BR><BR>--*SQL<BR>CREATE TABLE DateTest (D1 smalldatetime)<BR><BR><BR>--*ASP<BR>&#060;%<BR> SET sqlConn = SERVER.CREATEOBJECT("ADODB.Connection")<BR> SQLConn.Open "Provider=SQLOLEDB;Server=S;Database=D;Uid=U;Pwd=" <BR><BR> mm = "09"<BR> dd = "01"<BR> yyyy = "2000"<BR><BR> sSQL = "INSERT DateTest VALUES (&#039"+mm+"/"+dd+"/"+yyyy+"&#039)"<BR> SQLConn.execute(sSQL)<BR> %&#062;<BR><BR>Garth<BR>

  3. #3
    bobby Guest

    Default RE: it still not working !!!!!

    silly me i just looked at my coding i had two inserts <BR>Thanks Ever so much for your help!!!!<BR><BR>

Posting Permissions

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