| Author |
Message |
Luis Esteban Valencia
Guest
|
Posted:
Fri Feb 25, 2005 7:09 pm Post subject:
Trying to read data with the managed driver. |
|
|
I have this.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim db2conn As New MsDb2Connection(objconn.conndb2.ConnectionString)
Dim st As String = "SELECT * FROM HCB453AFIH.SRBDTA"
Dim sqladp As New MsDb2DataAdapter(st, db2conn)
Dim ds As New DataSet
sqladp.Fill(ds)
DataGrid1.DataSource = ds
DataGrid1.DataBind()
End Sub
but I have an error.
I tried to open the connection without dataadapters and it opened
succesfully so it must not be in the connection string.
Thanks
--
LUIS ESTEBAN VALENCIA
MICROSOFT DCE 3.
MIEMBRO ACTIVO DE ALIANZADEV
http://spaces.msn.com/members/extremed/ |
|
| Back to top |
|
 |
Luis Esteban Valencia
Guest
|
Posted:
Fri Feb 25, 2005 7:14 pm Post subject:
Re: Trying to read data with the managed driver. |
|
|
This is my string
myconn.ConnectionString = ("Provider=DB2OLEDB;User ID=xx;
Password=xx;Initial Catalog=s105w7vm;Network Transport Library=TCP;Host
CCSID=37;PC Code Page=1252;Network Address=S105W7VM;Network Port=446;Package
Collection=HCB453AFIH;Default Schema=HCB453AFIH;Process Binary as
Character=False;Units of Work=RUW;DBMS Platform=DB2/AS400;Persist Security
Info=False;Connection Pooling=True;")
SQL error occurred. SQLSTATE: HY000,
SQLCODE: -372
--
LUIS ESTEBAN VALENCIA
MICROSOFT DCE 3.
MIEMBRO ACTIVO DE ALIANZADEV
http://spaces.msn.com/members/extremed/
"Luis Esteban Valencia" <luisvalen@haceb.com> escribió en el mensaje
news:u1bzCtzGFHA.1996@TK2MSFTNGP12.phx.gbl...
| Quote: | I have this.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim db2conn As New MsDb2Connection(objconn.conndb2.ConnectionString)
Dim st As String = "SELECT * FROM HCB453AFIH.SRBDTA"
Dim sqladp As New MsDb2DataAdapter(st, db2conn)
Dim ds As New DataSet
sqladp.Fill(ds)
DataGrid1.DataSource = ds
DataGrid1.DataBind()
End Sub
but I have an error.
I tried to open the connection without dataadapters and it opened
succesfully so it must not be in the connection string.
Thanks
--
LUIS ESTEBAN VALENCIA
MICROSOFT DCE 3.
MIEMBRO ACTIVO DE ALIANZADEV
http://spaces.msn.com/members/extremed/
|
|
|
| Back to top |
|
 |
Neil Pike
Guest
|
Posted:
Sat Feb 26, 2005 5:13 am Post subject:
Re: Trying to read data with the managed driver. |
|
|
Luis - a -372 is a SQL error coming back from the DDM driver. Any messages on
the DB2 database server/mainframe side?
Neil Pike. Protech Computing Ltd |
|
| Back to top |
|
 |
Aaron Grady [MSFT]
Guest
|
Posted:
Sat Feb 26, 2005 6:49 am Post subject:
Re: Trying to read data with the managed driver. |
|
|
-372 is a somewhat generic error being returned from the AS/400. It is a DDM
SQLERRRM which doesn't tell us much. A network monitor trace may show more
as the SQLERRRM could contain some more error info.
Usually these types of errors occur when opening the connection due to some
problem in the connection string. Can you test this by opening the
connection in your code before calling the Fill method on the data adapter
to see which is causing the error. I would expect a different error if you
were connected but had a bad SQL statement or were trying to access an
object that didn't exist or you didn't have rights to...
HTH,
--
Aaron Grady
MCSE + Internet, MCDBA, MCSD
SNA Server/Host Integration Server 2000
Microsoft
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Neil Pike" <neilpike@compuserve.com> wrote in message
news:VA.000062bc.071e3990@compuserve.com...
| Quote: | Luis - a -372 is a SQL error coming back from the DDM driver. Any
messages on
the DB2 database server/mainframe side?
Neil Pike. Protech Computing Ltd
|
|
|
| Back to top |
|
 |
|
|
|
|