Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Posted

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

Posted

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

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...