Page 1 of 2 12 LastLast
Results 1 to 15 of 16

Thread: Can't get Tornado to work

  1. #1
    Join Date
    Aug 2006
    Posts
    7

    Can't get Tornado to work

    I started doing some development with the DLL that's included in the "Full Install" download, and everything seemed to be working fine (other than the fect that it's missing dbMagicCell...). Then I go to upgrade to the newest DLL (June 2006) and it asks for the id6 file. OK, I drop it in to the bin directory, and now I get nothing on the web page, just an empty screen.

    If I roll back to the original DLL, it works just fine.

    Here is the C# I'm trying to use:

    Tornado.z Mydb = new Tornado.z();
    Tornado.GetData GD = new Tornado.GetData();

    Mydb.dbUnit = "777";
    Mydb.dbDSN = "Provider=SQLOLEDB;Data Source=devlt43-02;Initial Catalog=Production;User ID=WebUser;Password=RoadRunner56!";
    Mydb.dbSQL = "select top 100 * from BillingQBReport";
    Mydb.ASPdbNET();


    And a related question - Tornado *is* compatible with C#, right? Every example I've seen is VB...

    Thanks.

    Bill

  2. #2
    Join Date
    Oct 2002
    Posts
    933
    DotNet DLL is language independent.

    After a full install, you should also download the latest DLL.

    You need to make sure the case is correct when you use C#. Either look at the API (from web page - api & code gallery) or use VS and setup a C# ASP.NET Web Application and the IntelliSense will kick in and display all the methods and properties with the right case. Try this is VS ->

    private void Page_Load(object sender, System.EventArgs e)
    {
    Tornado.z x=new Tornado.z();
    x.dbUnit = "1";
    x.dbSkin = "2";
    x.dbTextHolder = "Tit=U=Using C#";
    x.dbDSN = "NWIND";
    x.dbSQL = " EMPLOYEES";
    x.ASPdbNET();
    }

    or this in a stand alone aspx fle ->

    <script language="C#" runat="server">
    private void Page_Load(object sender, System.EventArgs e)
    {
    Tornado.z x=new Tornado.z();
    x.dbUnit = "1";
    x.dbSkin = "2";
    x.dbTextHolder = "Tit=U=Using C#";
    x.dbDSN = "NWIND";
    x.dbSQL = " EMPLOYEES";
    x.ASPdbNET();
    }
    </script>

    also ->

    <%
    Dim MyTest As New Tornado.Z
    Mytest.TornadoInfo()
    %>

    and ->

    <script language="C#" runat="server">
    private void Page_Load(object sender, System.EventArgs e)
    {
    Tornado.z x=new Tornado.z();
    x.TornadoInfo();
    }
    </script>





    If this code does not work, then send me your DLL and your ID file -> frank@aspdb.com

    Fk
    Last edited by Frank; 08-21-2006 at 09:38 PM.

  3. #3
    Join Date
    Oct 2002
    Posts
    933
    One more thing - the code generator (Ag) is supposed to generate both VB and C# code.

    Fk

  4. #4
    Join Date
    Aug 2006
    Posts
    7
    Well, I don't have a Northwind database available, but I could fake one I suppose - how do I set up the NWIND DSN?

    I tried running the sample code above, expecting it to error (since I don't have the DB), but it still only gave me a blank screen.

    I'm emailing you the DLL and id6 file.

    Bill

  5. #5
    Join Date
    Oct 2002
    Posts
    933
    If you got a blank screen then it is not right.. send me the DLL and id6 file. I'll send you the NWIND.MDB. Just place that in the /tornado/db dir for debug. Or you can use the Northwind DB in the MS-SQL.

    Got your files...no problem at all. Before I send you the " DLL and test files" I am working with, clarify whether you are using 1.1 or 2.0.

    Before you run your code, always run TornadoInfo to confirm the installation.


    Frank
    Last edited by Frank; 08-22-2006 at 10:59 AM.

  6. #6
    Join Date
    Aug 2006
    Posts
    7
    I found a northwind db (SQL) and switched to it (using a similar connection string to what I posted above), but still no good.

    I dropped the new DLL into the Tornado directory on my webserver, and TornadoInfo ran fine, so obviously it's something about my code that the newer DLLs don't like...

    Would it help if I zipped up my entire Visual Studio solution file and sent it to you?

    I'm using the 1.1 framework.

    Bill

  7. #7
    Join Date
    Oct 2002
    Posts
    933
    I put your DLL and id6 file in 1.1 and 2.0 and the TornadoInfo file works. Now, try that first before you try your own code.


    Frank

  8. #8
    Join Date
    Oct 2002
    Posts
    933
    Try this ->

    <script language="C#" runat="server">
    private void Page_Load(object sender, System.EventArgs e)
    {
    Tornado.z x=new Tornado.z();
    x.dbQP="u=88| s=2| TH=tit=Using C#| D=off2;northwind;sa;sa| Q=Employees| Type=SQL";
    x.ASPdbNET();
    }
    </script>

    off2 = server name; northwind=db name; sa=user id; sa=password


    Also, try this - In your own code add this line ->
    Mydb.dbType = "SQL";

  9. #9
    Join Date
    Oct 2002
    Posts
    933
    The problem is that for SQL class datasource, you must specify the data type (sqlclient, Oledb, odbc etc...). The reason fo ra blank pag eis that you have no error trap setup in teh server.

    The manual is not explicit enough. I'll updated the manual.

    Frank

  10. #10
    Join Date
    Aug 2006
    Posts
    7
    No luck - I get a blank page (except for the background image) with your test, and just a blank white page when adding Mydb.dbType = "SQL";
    to my code.

    Bill

  11. #11
    Join Date
    Oct 2002
    Posts
    933
    Mark told me you might be using code behind which should also work. Study the following example. It works in both code behind or a stand alone file. The HTML code is code behind code. Once you understand how to mix Tornado and the WebForm controls, it would be very powerful. You "cannot" accomplish the following example (lookup sort) w/o using Tornado.

    Fk


    <!--Grid LookUp Sort-->
    <%@ Import Namespace="System.Data" %>
    <script language="VB" runat="server">
    Sub Page_Load(sender As Object, e As EventArgs)
    If Not IsPostBack Then
    session("SortExp")= "EmployeeID"
    Bind
    End If
    End Sub

    Function CreateDataSource() As DataSet
    Dim TT As New Tornado.Z()
    With TT
    .dbQP = "U=99|S=24|Ps=-1|D=Nwind"
    .dbSQL = "Select employeeid, Birthdate, reportsto From employees"
    .dbCommonTables = "index=FullName| sql=Select Firstname & ' ' & Lastname from employees; index=EID|sql=Select Employeeid from employees"
    .dbLookUpFlds = "fi=ReportsTo|key=EID|look=FullName,fi=Employeeid| key=EID|look=FullName"
    .dbMagicCell = "Fi=ReportsTo|Mac=(|IN|||Nobody [Boss])"
    Return .ASPdbDS("fi=employeeid|Ty=string,fi=reportsto|Ty= string")
    End With
    End Function

    Sub Sort_Grid(sender As Object, e As DataGridSortCommandEventArgs)
    session("SortExp") = e.SortExpression.ToString()
    Bind
    End Sub

    Sub Page_Grid(Sender As Object, e As DataGridPageChangedEventArgs)
    DataGrid.CurrentPageIndex = e.NewPageIndex
    Bind
    End Sub

    Sub Bind()
    Dim DS as DataSet = CreateDataSource()
    Dim DV as DataView = DS.Tables("MyTable").DefaultView
    DV.Sort = session("SortExp")
    DataGrid.DataSource = DV
    DataGrid.DataBind()
    End Sub
    </script>
    <html>
    <body><center>
    <h3>DataGrid Magic Sorting Example<BR>This application sorts the lookup instead of the original value</h3>
    <form runat=server>
    <aspataGrid id="DataGrid" runat="server"
    CssClass="R1"
    PageSize="5"
    OnPageIndexChanged="Page_Grid"
    AllowPaging="True"
    AllowSorting="True"
    OnSortCommand="Sort_Grid"
    AutoGenerateColumns="false">
    <HeaderStyle HorizontalAlign="Center" CssClass="GH"></HeaderStyle>
    <AlternatingItemStyle CssClass="R2"></AlternatingItemStyle>
    <PagerStyle mode="NumericPages" horizontalalign="Left" CssClass="NB"></PagerStyle>
    <Columns>
    <asp:BoundColumn DataField="EmployeeID" HeaderText="Name" SortExpression="Employeeid" />
    <asp:BoundColumn DataField="BirthDate" HeaderText="Born" DataFormatString="{0:d}" SortExpression="Birthdate" />
    <asp:BoundColumn DataField="ReportsTo" HeaderText="Reports To" SortExpression="ReportsTo" />
    </Columns>
    </asp:datagrid>
    </form>

    </center></body>
    </html>

  12. #12
    Join Date
    Aug 2006
    Posts
    7
    Well, now Tornado is totally dead. I decided to start from scratch, so I uninstalled (via the Tornado06-EP-Full-Install.msi file), deleted every extra copy of the DLL I had downloaded, and reinstalled from the same msi file. I chose the path "C:/inetpub/wwwroot". Now, when I browse to http://localhost/Tornado/TornadoInfo.aspx, I get the following error:

    Compilation Error
    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

    Compiler Error Message: BC30002: Type 'tornado.z' is not defined.

    Source Error:

    Line 1: <%
    Line 2: Dim MyTest As New tornado.z
    Line 3: Mytest.TornadoInfo()
    Line 4: %>

    Source File: c:\inetpub\wwwroot\tornado\tornadoinfo.aspx Line: 2

    At this point we're going backwards instead of forwards... How do I set up a phone call with tech support? I can't afford to waste more time going back and forth via this forum and email.

    Thanks

    Bill

  13. #13
    Join Date
    Oct 2002
    Posts
    933
    Forget about Tornado for the moment. Run the Pure Nwind test code to see about your DotNet setup. No Tornado, No ASP-db, just a pure aspx file ->

    <%@ Import Namespace="System.Data.OLEDB" %>
    <script language="VB" runat="server">
    Sub Page_Load(Src As Object, E As EventArgs)
    '...Pure Nwind
    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()
    myDataGrid.DataBind()
    End Sub
    '...This test file is to test your general .Net setup. Replace the physical location and name of the Northwind database with your setup.
    </script>
    <html>
    <body>
    <ASPataGrid id="MyDataGrid" runat="server" />
    </body>
    </html>


    if you prefer SQL -> run the Pure SQL test ->
    <%@ Import Namespace="System.Data.SQLClient" %>
    <script language="VB" runat="server">
    '...Pure SQL SQLClient
    Sub Page_Load(Src As Object, E As EventArgs)
    Dim myConnection as New SQLConnection("server=myserver; database=pubs; UID=sa; PWD=sa")
    myConnection.Open
    Dim strSQL as String = "select * from authors order by au_lname"
    Dim myCommand as New SQLCommand(strSQL,myConnection)
    Dim myDataReader as SQLDataReader
    myDataReader = myCommand.ExecuteReader()
    myDataGrid.DataSource = myDataReader
    myDataGrid.DataBind()
    myConnection.Close()
    End Sub
    '...This test file is to test your DotNet and SQL2000 setup. Replace the SQL server name; table name; ID and password with your setup.
    </script>
    <html>
    <body>
    <ASPataGrid id="MyDataGrid" runat="server" />
    </body>
    </html>

  14. #14
    Join Date
    Aug 2006
    Posts
    7
    Works fine. None of the other web apps on this box have any problems.

  15. #15
    Join Date
    Oct 2002
    Posts
    933
    Do not install any tornado yet. Installation actually place supporting files under the /tornado dir.

    Now, just put the tornado.dll and tornado.id6 file in the /bin dir; put the MSDN.Css style file in the /tornado/css/ dir and test the tornadoinfo file (under the root). Remember there cannot be a vurtual dir call "tornado" at all - Just root=c:\inetpub\wwwroot.

    Fk

Posting Permissions

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