Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

mshflexgrid and sql server

rufiorufio Member Posts: 20
i want to display the contents of two related tables in an sql server database into an mshflexgrid control. the problem is that it doesn't want do connect to the database. i tried adodc controls, data environment and ado objects, but it doesn't seem to work. if anyone could give me some code example of how i could display data in the mshflexgrid object, i would really appreciate it. i also want to see how to use a shape interrogation with the mshflexgrid control. thanks.

Comments

  • GideonOmegaGideonOmega Member Posts: 617
    : i want to display the contents of two related tables in an sql server database into an mshflexgrid control. the problem is that it doesn't want do connect to the database. i tried adodc controls, data environment and ado objects, but it doesn't seem to work. if anyone could give me some code example of how i could display data in the mshflexgrid object, i would really appreciate it. i also want to see how to use a shape interrogation with the mshflexgrid control. thanks.
    :


    Could you post the connection string you are using - or is it a DSN..

    Personaly I tend to use a DSN if it is available for ease of use.
    [blue]
    C:Dos
    C:Dos Run
    Run Dos Run
    [/blue]

  • rufiorufio Member Posts: 20
    : : i want to display the contents of two related tables in an sql server database into an mshflexgrid control. the problem is that it doesn't want do connect to the database. i tried adodc controls, data environment and ado objects, but it doesn't seem to work. if anyone could give me some code example of how i could display data in the mshflexgrid object, i would really appreciate it. i also want to see how to use a shape interrogation with the mshflexgrid control. thanks.
    : :
    :
    :
    : Could you post the connection string you are using - or is it a DSN..
    :
    : Personaly I tend to use a DSN if it is available for ease of use.
    : [blue]
    : C:Dos

    it's ok. i got it. the example in msdn doesn't work, but i found an example in sql help and it seems to work. i use a connection string because i want the connection automatically established on whatever system i want to install the program. i don't know how to do that with dsn.


    : C:Dos Run
    : Run Dos Run
    : [/blue]
    :
    :

  • GideonOmegaGideonOmega Member Posts: 617
    : : : i want to display the contents of two related tables in an sql server database into an mshflexgrid control. the problem is that it doesn't want do connect to the database. i tried adodc controls, data environment and ado objects, but it doesn't seem to work. if anyone could give me some code example of how i could display data in the mshflexgrid object, i would really appreciate it. i also want to see how to use a shape interrogation with the mshflexgrid control. thanks.
    : : :
    : :
    : :
    : : Could you post the connection string you are using - or is it a DSN..
    : :
    : : Personaly I tend to use a DSN if it is available for ease of use.
    : : [blue]
    : : C:Dos
    :
    : it's ok. i got it. the example in msdn doesn't work, but i found an example in sql help and it seems to work. i use a connection string because i want the connection automatically established on whatever system i want to install the program. i don't know how to do that with dsn.
    :
    :
    : : C:Dos Run
    : : Run Dos Run
    : : [/blue]
    : :
    : :
    :
    :


    in the control panel you will see a icon that says ODBC Data Sources 32-bit ...for win98 if you have xp you have to go into the admin tools section of the control panel and it is labeled as "Data Sources(ODBC)"

    then you select system DSN and click add - and it will pretty much walk you through the rest - the nice thing about doing it this way is: all you need to do for your connection string is "DSN=yourDSN"
    which is great for stuff like SQL server.
    [blue]
    C:Dos
    C:Dos Run
    Run Dos Run
    [/blue]

Sign In or Register to comment.