Results 1 to 3 of 3

Thread: updated .csv source example

  1. #1
    wayne twitchell Guest

    updated .csv source example

    Is there an updated example of using a .csv as a data source???
    the example is gone off the web site.

    I have tried to establish a file dsn
    -----
    DB="FileDSN="& Server.MapPath("CSV.DSN&#34& ";DBQ=" & server.mappath(".&#34 & ";" ' Point to the database file in this directory
    -----
    and then used quickprops.
    -----
    MyDb.dbQuickProps="10011;"& DB & ";[Web.csv];grid;4,auto;std" ' set the quick properties
    MyDb.dbDBType = "TXT"
    -----


  2. #2
    wayne twitchell Guest

    updated .csv source example (reply)


    additional information. the error message I get is this.
    -----
    Error # (Get_RS_GetCount - After open CountSQL) = 80040E14(-2147217900)
    Description = [Microsoft][ODBC Text Driver] Syntax error in FROM clause.
    Source = Microsoft OLE DB Provider for ODBC Drivers
    SQL State = 37000
    Native Error = -3506
    -----
    ------------
    wayne twitchell at 10/22/01 12:10:30 PM

    Is there an updated example of using a .csv as a data source???
    the example is gone off the web site.

    I have tried to establish a file dsn
    -----
    DB="FileDSN="& Server.MapPath("CSV.DSN&#34& ";DBQ=" & server.mappath(".&#34 & ";" ' Point to the database file in this directory
    -----
    and then used quickprops.
    -----
    MyDb.dbQuickProps="10011;"& DB & ";[Web.csv];grid;4,auto;std" ' set the quick properties
    MyDb.dbDBType = "TXT"
    -----


  3. #3
    Frank Kwong Guest

    updated .csv source example (reply)

    Use NoDSN and the following file and code generated by Designer (cut and paste and adjust your directory) ->

    <%
    Set X= Server.CreateObject(&#34;ASP.DB&#34
    X.dbUnit = &#34;999&#34;
    X.dbMode = &#34;Dual-Horiz&#34;
    X.dbFormHideFlds = &#34;Comment&#34;
    X.dbGridColSort = False
    X.dbDBType = &#34;Text&#34;
    X.dbDSN = &#34;driver={Microsoft Text Driver (*.txt; *.csv)}; DriverId=27; MaxScanRows=5;defaultDir=EevVdata&#34;
    X.dbSQL = &#34;SELECT Symbol,LastTrade,Change,High,Low,Volume FROM Stock.csv&#34;
    X.ASPdb
    %>

    Text file (stock.csv)
    =====================
    Symbol,LastTrade,Change,High,Low,Volume
    DELL,47.0625,-0.875,47.875,46.5,25697100
    MSFT,93.25,-1.375,95.125,92.375,20974200
    YHOO,149,-3.6875,153.5,147.25,5043600
    AOL,101.125,1.3125,103.5,98.125,9349800
    USWB,20.375,-1.25,21.75,20.125,1194300
    WCOM,78.5,0.1875,79.9375,78.25,9635200







    ------------
    wayne twitchell at 10/22/01 12:12:20 PM


    additional information. the error message I get is this.
    -----
    Error # (Get_RS_GetCount - After open CountSQL) = 80040E14(-2147217900)
    Description = [Microsoft][ODBC Text Driver] Syntax error in FROM clause.
    Source = Microsoft OLE DB Provider for ODBC Drivers
    SQL State = 37000
    Native Error = -3506
    -----
    ------------
    wayne twitchell at 10/22/01 12:10:30 PM

    Is there an updated example of using a .csv as a data source???
    the example is gone off the web site.

    I have tried to establish a file dsn
    -----
    DB=&#34;FileDSN=&#34;& Server.MapPath(&#34;CSV.DSN&#34& &#34;;DBQ=&#34; & server.mappath(&#34;.&#34 & &#34;;&#34; &#39; Point to the database file in this directory
    -----
    and then used quickprops.
    -----
    MyDb.dbQuickProps=&#34;10011;&#34;& DB & &#34;;[Web.csv];grid;4,auto;std&#34; &#39; set the quick properties
    MyDb.dbDBType = &#34;TXT&#34;
    -----


Posting Permissions

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