Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 1.0
This is the forum to discuss the Wrox book Beginning ASP.NET 1.0 with C# by Chris Goode, John Kauffman, Christopher L. Miller, Neil Raybould, S. Srinivasa Sivakumar, Dave Sussman, Ollie Cornes, Rob Birdwell, Matt Butler, Gary Johnson, Ajoy Krishnamoorthy, Juan T. Llibre, Chris Ullman; ISBN: 9780764543708
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 1.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 8th, 2004, 03:48 PM
Registered User
 
Join Date: Nov 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default CS0246 error!!!

well i'm studyng on Asp.net Using C# (beginning wrox) and i've find there how to use the code behind
without using Vs.net.
Ok!! I'm using Dreamweaver to write code (i think it's not important) i'm using MySql and i've read that, to make the connection faster, it is better to use a specific .net connector (so I've installed ByteFx).
Well, if i try to write code in Visual studio adding a referement to the new dll the project run. But if i try to write code in dreamweaver an try to execute the aspx page in Ie there is promted this error (i try to translate in english) :" impossible to find type or the space name byteFx probablY there isn't an using direttive ...."

i must inform you the in the assembly directory there are the two dll needed to run the project and also there are defined in the window registry.
Ok i use Win Xp Prof and this is the sample code which causes problem:

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using ByteFX.Data.MySqlClient;

public class MyCodeBehind : Page
{
public TextBox name;
public Label message;
public Label message1;

    public void SubmitBtn_click(object sender, EventArgs e)
    {
    string User=name.Text;
    message.Text="Hello " + name.Text;
    string strconn="Server=localhost; User ID=root; Password = 2429329; Initial Catalog=gestionale";
    MySqlConnection conn = new MySqlConnection(strconn);
    conn.Open();
    string sql="SELECT nome FROM gestionale.anagrafica";
    MySqlDataAdapter OleDbCmd = new MySqlDataAdapter(strconn, conn);
    OleDbCmd.ExecuteNonQuery();
    message1.Text="COMANDO ESEGUITO";



thank yoy very much
 
Old November 9th, 2004, 07:56 AM
Friend of Wrox
 
Join Date: Sep 2004
Posts: 140
Thanks: 0
Thanked 0 Times in 0 Posts
Default

At Fist Look code looks ok do some exception handling to get to what is happening...may be ByteFX.Data.MySqlClient be giving some exceptions

 
Old November 9th, 2004, 07:57 AM
Friend of Wrox
 
Join Date: Sep 2004
Posts: 140
Thanks: 0
Thanked 0 Times in 0 Posts
Default

And i missed one thing r u using proper refrences






Similar Threads
Thread Thread Starter Forum Replies Last Post
Parse error: syntax error, unexpected T_ELSE in /h vipin k varghese BOOK: XSLT Programmer's Reference, 2nd Edition 4 September 29th, 2011 01:19 AM
Insert Query Error & Run-Time Error 3022 DavidWE Access 1 July 31st, 2008 11:17 AM
Ch 4: Parse error: syntax error, unexpected T_SL hanizar77 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 0 June 23rd, 2008 09:17 PM
Compiler Error Message: CS0246: The type or namesp frmsasp All Other Wrox Books 0 September 17th, 2005 09:13 AM
error CS0246: 'AppException' could not be found Gjerstad BOOK: ASP.NET Website Programming Problem-Design-Solution 1 July 10th, 2003 02:02 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.