By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,592 Members | 2,158 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,592 IT Pros & Developers. It's quick & easy.

connection error from .net to as400 db2 database

P: n/a
I am getting the following error while trying to connect to a DB2
database on the as400.It worked fine at first then I started getting
this err message.
Non-NULL controlling IUnknown was specified, and either the requested
interface was not IUnknown, or the provider does not support COM
aggregation.

Dim cndb As New OleDb.OleDbConnection("Provider=IBMDA400.DataSourc e.1;Password=SADW;User
ID=pg3000001;Data Source=as9625g;Protection Level=None;Transport
Product=Client Access;SSL=DEFAULT;Force Translate=65535;Default
Collection=PG3000001;Convert Date Time To Char=TRUE;")

If Not IsPostBack Then
Dim dstX As DataSet
Dim sSQL As String = "select school, school_number
from SBBCWEB.TSCHOOL where (school_number > '0000' and school_number <
'6200' and (NOT(school LIKE '%(%'))) or school_number = 'H001' order
by school"

Dim dtrX As New OleDb.OleDbDataAdapter(sSQL, cndb)

dstX = New DataSet()
err is here --> cndb.Open()
dtrX.Fill(dstX, "TSCHOOL")

ddnLocation.DataSource = dstX
ddnLocation.DataTextField = "school"
ddnLocation.DataValueField = "school_number"
ddnLocation.DataBind()

cndb.Close()
Nov 12 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.