what is the easiest way to bind data?

Last post 05-08-2008 11:19 AM by megetron. 5 replies.

Sort Posts:

  • what is the easiest way to bind data?

    04-22-2008, 11:59 AM
    • Loading...
    • megetron
    • Joined on 03-13-2006, 5:38 AM
    • Posts 374

    On MS SQL SERVER it was so easy binding data. you could insert your query inside the SQLDATASOURCE object, and that's it. the data bind perfect.

    in mySQL this is not supported, and for every new query I have to design a new DAL and BLL code, which driving me mad, I am wasting loads of time for this repeated operation which I did in SQL SERVER in no time.

    Can you please advice if there is an easy way to bind data ? an article or tips can help, thank you.

  • Re: what is the easiest way to bind data?

    04-22-2008, 1:25 PM
    • Loading...
    • jdingo
    • Joined on 01-03-2007, 2:28 PM
    • Posts 333
    you can write some nice, general database code using the sqlconnection and sqlcommand, sqldatareader, and dataset....returning a result set from your query and setting the dataset to the result set, you can use the dataset to bind to that way...everyone uses the sqldatasource and such, i use sql server but write all my own stuff...sometimes it takes more time, but it comes out nice and clean and my methods are very generalized and i can use them in many ways...databinding to a dataset is easy and the code setting up the connection and command is not bad either...give it a shot...actually i mispoke before when speaking of those classes, those are sqlserver specific but just use one of the other dataproviders to accomplish the same thing.  I can send you some code which is using the sqlserver providers but you can use that as a ref and then use your specific dataprovider in ado.net....if interested just let me know -- jp
    If my post is helpful please mark as answer
    Regards -- jp
    (http://www.rzrsolutions.com/rzrWeb20/BlogViewScreen.aspx)
  • Re: what is the easiest way to bind data?

    05-03-2008, 10:39 AM
    • Loading...
    • megetron
    • Joined on 03-13-2006, 5:38 AM
    • Posts 374
    thank you. a code as a ref could be just fine.
    maybe there is already a code ready to use for mySQL on the net?
    how can I search it? what is the key word I should search for?

     

  • Re: what is the easiest way to bind data?

    05-05-2008, 4:15 PM
    • Loading...
    • jdingo
    • Joined on 01-03-2007, 2:28 PM
    • Posts 333

     

    take a look here, this may be of some help with setting up the provider

     

    http://dev.mysql.com/downloads/connector/net/5.1.html -- jp 

    If my post is helpful please mark as answer
    Regards -- jp
    (http://www.rzrsolutions.com/rzrWeb20/BlogViewScreen.aspx)
  • Re: what is the easiest way to bind data?

    05-06-2008, 5:35 PM
    • Loading...
    • megetron
    • Joined on 03-13-2006, 5:38 AM
    • Posts 374

    I already download the connector. and I can execute queries.

    the problem is that for every simple query I will need to build a whole set of BLL code and DAL code, which I don't want to do.
    In SQL SERVER all I need to do is to select the query and data will be displayed on page.

    So, how can I do such using this connector?

  • Re: what is the easiest way to bind data?

    05-08-2008, 11:19 AM
    • Loading...
    • megetron
    • Joined on 03-13-2006, 5:38 AM
    • Posts 374

    OK, it took me sometime to understand what I need, so I will simplify my question.

    I would like to use the MySQL database with DATASET functionallity.
    this will help me display short SELECT queries, without writing any code behind.

    the problem is , when using a dataset, I get comilation errors that say:
    The type MySqlConnection exists in both <<Temporary ASP.NET Files folder>> and <<Project folder>>


    I think, If I will get DATASET functionallity works with mySQL, my problem will be solved, and I will be able reduce 30% of code that anyway used only once in my applications.

    Do you have an idea regarding this?
    Thank you.

Page 1 of 1 (6 items)