Results 1 to 2 of 2

Thread: reserved words

  1. #1
    Join Date
    Nov 2002
    Posts
    1

    reserved words

    Hi guys
    This is kind of a tornado question as it developed while using Tornado on a new net server to use the Tornado Dll.

    I transfered from a ASP server to a net enabled server. One of the fields in my access db was "zone". It displays fine with Tornado in grid and form but if I use it a SQL statement (select * from table where zone = ...) in filter,add and update mode I get an error.
    I went back and checked my old asp page (classic asp, not asp-db) and found I get the same thing on the net server. Since the db and the same SQL statement in asp pages worked OK on my non net framework server, it set me wondering if it was a net thing . Could it be that the net framework does not like the word zone in a sql statement.
    (If I change the db field to county, it woks fine)
    Is there anyway I can found about reserved words in net?

    This is not really Tornado specific but thanks anyway.

    By the way, the dbAllcase function does not seem to be supported in the non obdc eval version of Tornado (I downloaded it in early september). The OBDC eval works fine

  2. #2
    Join Date
    Oct 2002
    Posts
    93
    Hi,

    The easiest way to determine if it's a .NET thing or not is to run the PureDotNet-Nwind.aspx program below. If it fails in there, then it's not a Tornado problem, it's a database or .NET problem.

    Try the program below (modify it for your data source) and see if it runs. If not, it's either .NET or your data source.

    Thanks,
    John

    <%@ Import Namespace="System.Data.OLEDB" %>
    <script language="VB" runat="server">
    Sub Page_Load(Src As Object, E As EventArgs)
    Sub Page_Load(Src As Object, E As EventArgs)
    Dim strConn as string ="PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" & server.mappath("/Tornado/DB/NWIND.mdb") & ";"
    Dim strSQL as string ="select * from shippers"
    Dim Conn as New OLEDBConnection(strConn)
    Dim Cmd as New OLEDBCommand(strSQL,Conn)
    Conn.Open()
    myDataGrid.DataSource = Cmd.ExecuteReader(system.data.CommandBehavior.Clos eConnection)
    myDataGrid.DataBind()
    End Sub
    </script>

    <html>
    <body>
    <ASP:DataGrid id="MyDataGrid" runat="server" />
    </body>
    </html>

Posting Permissions

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