ASP.NET 2.0 C# WebService Connect to Database: Sql Server 2005

Discussion in 'ASP .Net Web Services' started by Wendi Turner, May 6, 2008.

  1. Wendi Turner

    Wendi Turner Guest

    ASP.NET 2.0 C# WebService Connect to Database: Sql Server 2005
    ---------------------------------------------------------------------------------------------------

    I have successfully created a webservice in ASP.NET 2.0 C# with VS
    2005 & VS 2008, however, i can find nothing - books or otherwise to
    help with the webservice connection to the database.

    Can anyone please offer help on what to return in the method that
    makes a select statement to the database and HOW to connect to the
    database?? Do i use DataSets, TableAdapters, drivers???

    How??
    Wendi Turner, May 6, 2008
    #1
    1. Advertising

  2. Wendi Turner

    Ryan Guest

    try to search on google about Scott Gu tips.
    Really nice codes about Datasets (DAL) connection.

    "Wendi Turner" wrote:

    > ASP.NET 2.0 C# WebService Connect to Database: Sql Server 2005
    > ---------------------------------------------------------------------------------------------------
    >
    > I have successfully created a webservice in ASP.NET 2.0 C# with VS
    > 2005 & VS 2008, however, i can find nothing - books or otherwise to
    > help with the webservice connection to the database.
    >
    > Can anyone please offer help on what to return in the method that
    > makes a select statement to the database and HOW to connect to the
    > database?? Do i use DataSets, TableAdapters, drivers???
    >
    > How??
    >
    Ryan, May 6, 2008
    #2
    1. Advertising

  3. Wendi Turner

    UT-BadBoy Guest

    On May 6, 2:10 am, Ryan <> wrote:
    > try to search on google about Scott Gu tips.
    > Really nice codes about Datasets (DAL) connection.
    >
    >
    >
    > "Wendi Turner" wrote:
    > > ASP.NET 2.0 C# WebService Connect to Database: Sql Server 2005
    > > ---------------------------------------------------------------------------­------------------------

    >
    > > I have successfully created a webservice in ASP.NET 2.0 C# with VS
    > > 2005 & VS 2008, however, i can find nothing - books or otherwise to
    > > help with the webservice connection to the database.

    >
    > > Can anyone please offer help on what to return in the method that
    > > makes a select statement to the database and HOW to connect to the
    > > database??   Do i use DataSets, TableAdapters, drivers???

    >
    > > How??- Hide quoted text -

    >
    > - Show quoted text -


    Are you talking about trying to connect to a Database through your
    webservice?
    Is the database located in a SQL Server?
    If so, look into using the System.Data.SqlClient namespace and use the
    SqlCommand, SqlConnection classes to connect to the database.
    You just specify the sql connection string to your database, server,
    etc.
    UT-BadBoy, May 7, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page