OBDC txt Driver not showing some Dates (ASP - VBSc

Results 1 to 2 of 2

Thread: OBDC txt Driver not showing some Dates (ASP - VBSc

  1. #1
    Join Date
    Dec 1969

    Default OBDC txt Driver not showing some Dates (ASP - VBSc

    I have made a recordset from a csv(txt) file and all is A ok on my machine and on one server but the server I want to run on it doesnt show some dates?<BR><BR>I noticed that the dates it doesn&#039;t show are ones where the day is graeter than 12???<BR><BR>I am in UK<BR><BR>my results page doesn&#039;t show all CourseCommD on new windows 2003 server Microsoft access in not installed.<BR>I think the new server has a newer version of the OBDC txt driver as well??<BR><BR>AENO CommD<BR>23996<BR>23997 11/09/2004<BR><BR>where as my machine and other development server that do have access on them (windows XP and windows 2000server) show all is OK<BR>AENO CourseCommD<BR>23996 25/10/2004<BR>23997 09/11/2004<BR><BR><BR>Any ideas I am desperate to solve this<BR><BR><BR>here is the code on my page<BR><BR>&#060;!--#include file="../Connections/contxtStjohn.asp" --&#062;<BR>include file content is <BR>&#060;%<BR>&#039; FileName="Connection_ado_conn_string.htm"<BR>&#039 ; Type="ADO" <BR>&#039; DesigntimeType="ADO"<BR>&#039; HTTP="false"<BR>&#039; Catalog=""<BR>&#039; Schema=""<BR>Dim MM_contxtStjohn_STRING<BR>MM_contxtStjohn_STRING = "Driver={Microsoft Text Driver (*.txt; *.csv)};Dbq=C:Inetpubwwwrootstjohnwalescontrol ;Extensions=asc,csv,tab,txt"<BR>%&#062;<BR><BR><BR >&#060;%<BR>Dim CSV_show<BR>Dim CSV_show_numRows<BR>Set CSV_show = Server.CreateObject("ADODB.Recordset")<BR>CSV_show .ActiveConnection = MM_contxtStjohn_STRING<BR>CSV_show.Source = "SELECT * FROM WSU1910145450.txt Order by AENO ASC"<BR>CSV_show.CursorType = 0<BR>CSV_show.CursorLocation = 2<BR>CSV_show.LockType = 1<BR>CSV_show.Open()<BR>CSV_show_numRows = 0<BR>%&#062;<BR><BR>and to display date field CoursCommD I simply do<BR>&#060;%=(CSV_show.Fields.Item("CourseCommD") .Value)%&#062;<BR>no formatting as you see<BR><BR><BR>NB : the actual (csv) txt always contains a date in the CourseCommD feld<BR><BR><BR>"23996","B","ACFAW","NP","13",0,0, "25/10/2004","09.00","17.00","28/10/2004","09.00","17.00","","0","0",1,1<BR>"23997","B ","ACFAW","NP","13",0,0,"09/11/2004","09.00","17.00","12/11/2004","09.00","17.00","","0","0",1,1<BR><BR><BR>so why is 25/10/2004 on record 23996 no showing on my new server<BR>I am gutted as I spent ages testing on my machine and older development server only to find it doesn&#039;t work on new server.<BR>my page later goes on to do sql inserts ..etc and intially I thought it was my sql insert statement but when I made a simple recordset & display page to test.... I see its before any of that and the date are not being read in ..in the first place.

  2. #2
    Join Date
    Dec 1969

    Default Possibly new server with wrong locale?

    It looks like maybe the new server is set to use USA locale, instead of UK.<BR><BR>You might try doing<BR> Session.LCID = &H0809 &#039; force UK locale<BR>at the top of the page to see if that changes anything.<BR><BR>But what is strange to me is that those fields are even being *treated* as Date fields. With quotes around them, I would have expected them to be treated simply as strings.<BR><BR>Have you set up a DSN that *knows* what type each field is?<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