Problems with dataset and dataadapter

Discussion in 'ASP .Net' started by Rui Dias, Aug 19, 2005.

  1. Rui Dias

    Rui Dias Guest

    Greetings,
    Can You take a look to the following code?

    SQLComando = New SqlCommand(strsql, myConnection2)

    SQLComando.CommandTimeout = 45

    Dim daGrid1 As SqlDataAdapter = New SqlDataAdapter

    daGrid1.SelectCommand = SQLComando

    myConnection2.Open()

    Dim dsGrid1 As DataSet = New DataSet

    daGrid1.Fill(dsGrid1, "Lista")


    As you can see it is a perfect straight forward code. The sql SELECT string
    is correct, and it's not placed here for space concern.
    Now it comes the question. Why sometimes the fill doesn't work? Sometimes it
    gives me the following error:

    System.Data.SqlClient.SqlException: Invalid object name 'ASS_Processamento'.
    Invalid object name 'ASS_Justificacao'. Invalid object name
    'ASS_TipoJustificacao'. Invalid object name 'ASS_Justificacao'. Invalid
    object name 'ASS_TipoJustificacao... ************ retirado parte da
    mensagem por espaço*************

    wAssiduidade.wfrmJustificar.Justificar() in
    C:\Inetpub\wwwroot\wAssiduidade\wfrmJustificar.aspx.vb:line 161 Invalid
    object name 'ASS_Processamento'. Invalid object name 'ASS_Justificacao'.

    Invalid object name 'ASS_TipoJustificacao'. Invalid object name
    'ASS_Justificacao'. Invalid object name 'ASS_TipoJustificacao'.

    Am I making any sense? The table is in DB, SELECT statement has a (NOLOCK)
    statement,...
    Sometimes, even more rarely, the fill doesn't fills :) data. datatable comes
    with no rows when it should come. they're there!

    Regards,

    Rui Dias
    Rui Dias, Aug 19, 2005
    #1
    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. Galen Harris

    dataadapter.update -- dataset from session

    Galen Harris, Oct 23, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    534
    Jacob Yang [MSFT]
    Oct 24, 2003
  2. Galen Harris
    Replies:
    1
    Views:
    458
    Patrik Löwendahl
    Oct 24, 2003
  3. Amadelle
    Replies:
    1
    Views:
    357
    John Saunders
    Jun 5, 2004
  4. =?Utf-8?B?Qm9vbmFhcA==?=

    typed dataset - dataAdapter - parameter question

    =?Utf-8?B?Qm9vbmFhcA==?=, Jun 23, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    583
    =?Utf-8?B?Qm9vbmFhcA==?=
    Jun 23, 2005
  5. Stanav
    Replies:
    2
    Views:
    7,448
    Stanav
    Nov 14, 2005
Loading...

Share This Page