Problem in sql connection through adodc control in v.b 6.0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hussainiyad
    New Member
    • Feb 2007
    • 31

    Problem in sql connection through adodc control in v.b 6.0

    Dear all,
    i,m new to v.b and i tried to connect to sqlserver through adodc in a datagrid or datalist , but there was no result in my form, can any one tell me what's the reason and i done every thing to connect with the sql
    step 1:Right click the adodc control declared the provider,databa se,pwd
    step2.: In choose Record source i declaled the commad type as "cmd table" and as well the table name
    step 3 : Draged a data grid and declared the datasouce as " adodc1"

    but still i couldn' t see the result
    (I also tried to connect the Ms.Access but it also not coming)

    plz advice me the above solution
    Thanks in advance
  • Tenneyson
    New Member
    • Apr 2008
    • 17

    #2
    Try this for your datagrid adodc problem

    Step 1: Draw your adodc1 and data grid on your form

    step 2: on your windows start menu, go to setting and then control panel where we are going to create a connection that you are going to be using
    Follow the following root: Control Panel.....Perfo rmance and Maintenance.... Administrative Tools......Data Sources(ODBC). Then under UserDSN tab select add on right side of the box. In the Create New data source dialog box, scroll down to select SQL server. Click Finish then Give it a name, description(Can be of tha same name eg MySQLConn) and select the server where your sql database resides. Go next and change the default database to your databaseName and finish

    step 3: Right click on your Adodc1 and go to adodc properties. Under General Tab choose Use ODBC data souce name and drop down the combobox to select the data source you created earlier in your windows control panel. Under the Record source tab cmdtype = 1-Adcmdtext and under cmdText=select * from [Table Name] and the apply and OK.

    Step 4: datagrid properties- datasource=adod c1

    run your program

    Comment

    Working...