Results 1 to 7 of 7

Thread: Retrieve data from Mysql to a TextBox

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2008
    Posts
    18

    Retrieve data from Mysql to a TextBox

    Hello, i'm using .net 2008 and i managed to made a connection with mysql i have a database named e-learn and a table named internet with fields
    i_questnum
    i_questtext
    i_questtype

    how do i get to show a record (i_questtext) into a text box and what if want to put a button and each time i press it it will show me the next record

    forgive my English i'm from Greece...
    any help would be apreciate

  2. #2
    Frenzied Member usamaalam's Avatar
    Join Date
    Nov 2002
    Location
    Karachi
    Posts
    1,308

    Re: Retrieve data from Mysql to a TextBox

    This is how you show your record in textbox. Replace $obj with the object you are using.

    Code:
    <input name="title" type="text" value="<?=$obj->i_questtext?>" size="60">
    You can move to next record using mysql_fetch_object(). If you are trying to give navigation button, why don't you pull the specific record you want to show when the button is clicked. In your case if you do it with php, you need to get the data again when the page is posted back otherwise you need to provide navigation using javascript.

    Thanks.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jun 2008
    Posts
    18

    Re: Retrieve data from Mysql to a TextBox

    thank you very much!

    actually i found a way to do this, but now i have another problem.. thing is that i wanted to install this form to workstations in my school. When i install it to another computer it doesn't show any data! i try to create an odbc through the control panel but it doesn't connect

    the mysql server ip is 192.168.1.66 --> teach-b (is the name)

  4. #4
    Frenzied Member usamaalam's Avatar
    Join Date
    Nov 2002
    Location
    Karachi
    Posts
    1,308

    Re: Retrieve data from Mysql to a TextBox

    Can you show your code where you are trying to connect to the database?

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Jun 2008
    Posts
    18

    Re: Retrieve data from Mysql to a TextBox

    i did that using design view.. i made from control panel a connection
    and i created a new dataset in vb.net

    i will attach the file, i'm not sure what you mean so i give you my file..
    Attached Files Attached Files

  6. #6
    Frenzied Member usamaalam's Avatar
    Join Date
    Nov 2002
    Location
    Karachi
    Posts
    1,308

    Re: Retrieve data from Mysql to a TextBox

    I'm really sorry I didn't notice .NET 2008, I just assumed you are using MySQL with PHP. I'll check your code.

    Thanks.

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Jun 2008
    Posts
    18

    Re: Retrieve data from Mysql to a TextBox

    oh that's ok , i thought that i had to write some php

    i wrote some php to add , edit , delete data from table internet

    and now i want to setup a form to a lan that will show records from database e-learn

    how do i do that?

    on the computer that database is installed everything works ok, when i install it to another ...

Posting Permissions

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



Click Here to Expand Forum to Full Width