dataset in a Web Service

Discussion in 'ASP .Net Web Services' started by ThunderMusic, Nov 23, 2005.

  1. ThunderMusic

    ThunderMusic Guest

    Hi,
    I have a web service. It works fine until it hits a
    dataadapter.fill(dataset) Is it normal? it results in a "The page cannot be
    displayed (HTTP 500)" page.

    Dim dbMan As DBManager
    Dim dbConn As IDbConnection
    Dim dbDA As IDataAdapter
    Dim dbCB As System.ComponentModel.Component
    Dim dbds As DataSet
    Dim dbRow As DataRow

    dbType = MYSQL
    dbParams = New DBParamMySQL
    DirectCast(dbParams, DBParamMySQL).ServerName = <NotShown>
    DirectCast(dbParams, DBParamMySQL).DBName = <NotShown>
    DirectCast(dbParams, DBParamMySQL).Username = <NotShown>
    DirectCast(dbParams, DBParamMySQL).Password = <NotShown>

    'Get the DB Manager object setting the good db type and params
    dbMan = New DBManager(dbType, dbParams)

    dbConn = dbMan.GetNewConnection
    dbDA = dbMan.GetNewDataAdapter("Select * From table1 where 0=1", dbConn)
    dbCB = dbMan.GetNewCommandBuilder(dbDA)
    dbDA.Fill(dbds) <--That's where is bugs

    I have commented everything and tested and uncommented 1 line at a time and
    everything works until I uncomment the Fill line...

    Please help me, I'm lost.

    Thanks
    ThunderMusic, Nov 23, 2005
    #1
    1. Advertising

  2. ThunderMusic

    ThunderMusic Guest

    problem solved, I had to define a New dataset (dim dbds as NEW dataset)
    grrrrr, stupid error!!

    Thanks anyways... ;)

    "ThunderMusic" <NO.danlat.at.hotmail.com.SPAM> a écrit dans le message de
    news: %23x%231wW%...
    > Hi,
    > I have a web service. It works fine until it hits a
    > dataadapter.fill(dataset) Is it normal? it results in a "The page cannot
    > be displayed (HTTP 500)" page.
    >
    > Dim dbMan As DBManager
    > Dim dbConn As IDbConnection
    > Dim dbDA As IDataAdapter
    > Dim dbCB As System.ComponentModel.Component
    > Dim dbds As DataSet
    > Dim dbRow As DataRow
    >
    > dbType = MYSQL
    > dbParams = New DBParamMySQL
    > DirectCast(dbParams, DBParamMySQL).ServerName = <NotShown>
    > DirectCast(dbParams, DBParamMySQL).DBName = <NotShown>
    > DirectCast(dbParams, DBParamMySQL).Username = <NotShown>
    > DirectCast(dbParams, DBParamMySQL).Password = <NotShown>
    >
    > 'Get the DB Manager object setting the good db type and params
    > dbMan = New DBManager(dbType, dbParams)
    >
    > dbConn = dbMan.GetNewConnection
    > dbDA = dbMan.GetNewDataAdapter("Select * From table1 where 0=1", dbConn)
    > dbCB = dbMan.GetNewCommandBuilder(dbDA)
    > dbDA.Fill(dbds) <--That's where is bugs
    >
    > I have commented everything and tested and uncommented 1 line at a time
    > and everything works until I uncomment the Fill line...
    >
    > Please help me, I'm lost.
    >
    > Thanks
    >
    ThunderMusic, Nov 23, 2005
    #2
    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.
Similar Threads
  1. hocho888
    Replies:
    1
    Views:
    623
  2. Michael Averstegge
    Replies:
    0
    Views:
    4,220
    Michael Averstegge
    Jan 10, 2006
  3. Not Me
    Replies:
    1
    Views:
    3,182
    Not Me
    Jun 5, 2007
  4. Isaias Formacio Serna

    Web Service that calls an external Web Service

    Isaias Formacio Serna, Jan 28, 2004, in forum: ASP .Net Security
    Replies:
    5
    Views:
    247
  5. Leo Violette
    Replies:
    0
    Views:
    1,020
    Leo Violette
    Apr 17, 2009
Loading...

Share This Page