ym21 Posted May 20, 2005 Posted May 20, 2005 hi all i am newbies in asp .net i am trying to connect sql server 2k database and got this error message Non-NULL controlling IUnknown was specified, and either the requested interface was not IUnknown, or the provider does not support COM aggregation. please advice. thanks in advance Quote
Administrators PlausiblyDamp Posted May 20, 2005 Administrators Posted May 20, 2005 Any chance you could post the code you are using? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
ym21 Posted May 20, 2005 Author Posted May 20, 2005 Actually i do not think that is the coding problem cause i wrote the coding in a class. i have try to call this function in other form and it worked well. I also checked the parameter passed in. Can u let me know what are the posibility occur this error. i use debug mode to see the code, when it executed to the oConn.Open() it jump to the exception and show the error message. Anyway this is the coding Public Function GetFromOledbToDataSet(ByVal sCommand As String) As DataSet Dim oConn As New ADODB.Connection oConn.ConnectionString = sConnectionString oConn.CursorLocation = ADODB.CursorLocationEnum.adUseClient Dim oResultRecordset As New ADODB.Recordset Try oConn.CommandTimeout = 10 oConn.Open() oResultRecordset.ActiveConnection = oConn oResultRecordset.MaxRecords = MaxNoOfRecord oResultRecordset.CursorType = ADODB.CursorTypeEnum.adOpenStatic oResultRecordset.Open(sCommand) Dim oDataSet As New DataSet Dim oOledbDataAdapter As New OleDbDataAdapter oOledbDataAdapter.Fill(oDataSet, oResultRecordset, "FNDOCUMENT") oConn.Close() Return oDataSet Catch ex As Exception System.Diagnostics.Debug.WriteLine(ex.Message) Return Nothing Finally If Not oConn Is Nothing Then If oConn.State = ConnectionState.Open Then oConn.Close() End If End If End Try End Function Quote
ym21 Posted May 24, 2005 Author Posted May 24, 2005 provider=FnDBProvider;data source=vpcscbapp;SystemType=2;LogonID=e8810f8a8cba3ef71a2d707f0b5b29d2;Prompt=4;Pooling=true;Min Pool Size=0;Max Pool Size=15" sorry for late reply Quote
Moderators Robby Posted May 24, 2005 Moderators Posted May 24, 2005 Why are you using ADODB and what is FnDBProvider? Quote Visit...Bassic Software
Recommended Posts