I have the following (VB.NET) code:
For some reason, I can't get this code to return anything but a ResultSet
with 0 rows. Any ideas?
Public Function GetDependencies(ByVal db As SQLDMO.Database2) As String
Dim objSP As SQLDMO.StoredProcedure2 = db.StoredProcedures.Item(Me.Text)
Dim objQueryResults As SQLDMO.QueryResults = _
objSP.EnumDependencies(SQLDMO.SQLDMO_DEPENDENCY_TYPE.SQLDMODep_Valid)
Dim sb As New System.Text.StringBuilder(4096)
Dim writer As New System.IO.StringWriter(sb)
For i As Integer = 1 To objQueryResults.ResultSets
objQueryResults.CurrentResultSet = i
For j As Integer = 1 To objQueryResults.Rows
For k As Integer = 1 To objQueryResults.Columns
writer.Write(objQueryResults.ColumnName(k) & ": ")
writer.WriteLine(objQueryResults.GetColumnString(j, k))
Next
Next
Next
writer.Flush()
writer.Close()
Return sb.ToString()
End Function
Developer ExtraordinaireHi
Don't forget, in SQL 7.0 and 2000, dependency information is not guaranteed
to be correct due the Deferred Name resolution.
Have you looked in sysdepends if there is information there.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
<developerExtraordinaire@.spamMeAndDie.com> wrote in message
news:ewd2zkeGFHA.1740@.TK2MSFTNGP09.phx.gbl...
> I have the following (VB.NET) code:
> For some reason, I can't get this code to return anything but a ResultSet
> with 0 rows. Any ideas?
> Public Function GetDependencies(ByVal db As SQLDMO.Database2) As String
> Dim objSP As SQLDMO.StoredProcedure2 =
db.StoredProcedures.Item(Me.Text)
> Dim objQueryResults As SQLDMO.QueryResults = _
> objSP.EnumDependencies(SQLDMO.SQLDMO_DEPENDENCY_TYPE.SQLDMODep_Valid)
> Dim sb As New System.Text.StringBuilder(4096)
> Dim writer As New System.IO.StringWriter(sb)
> For i As Integer = 1 To objQueryResults.ResultSets
> objQueryResults.CurrentResultSet = i
> For j As Integer = 1 To objQueryResults.Rows
> For k As Integer = 1 To objQueryResults.Columns
> writer.Write(objQueryResults.ColumnName(k) & ": ")
> writer.WriteLine(objQueryResults.GetColumnString(j, k))
> Next
> Next
> Next
> writer.Flush()
> writer.Close()
> Return sb.ToString()
> End Function
>
> Developer Extraordinaire
>
Showing posts with label sql-dmo. Show all posts
Showing posts with label sql-dmo. Show all posts
Thursday, March 29, 2012
Wednesday, March 7, 2012
enterprise manager error
when launching the enterprise manager software, I'm getting the following message "title microsoft sql-dmo, error 126 : genral error". I could not find informations onthis error in the help. does someo,ne have an idea?
Hi,
You may need to re-register the SQL DMO dlls. Verify the below link:-
http://support.microsoft.com/?id=248241
Thanks
Hari
MCDBA
"erwan" <anonymous@.discussions.microsoft.com> wrote in message
news:7D9E5861-233F-4850-A7F2-888FB017E8E3@.microsoft.com...
> when launching the enterprise manager software, I'm getting the following
message "title microsoft sql-dmo, error 126 : genral error". I could not
find informations onthis error in the help. does someo,ne have an idea?
|||thanks hari I've fixed the problem
Hi,
You may need to re-register the SQL DMO dlls. Verify the below link:-
http://support.microsoft.com/?id=248241
Thanks
Hari
MCDBA
"erwan" <anonymous@.discussions.microsoft.com> wrote in message
news:7D9E5861-233F-4850-A7F2-888FB017E8E3@.microsoft.com...
> when launching the enterprise manager software, I'm getting the following
message "title microsoft sql-dmo, error 126 : genral error". I could not
find informations onthis error in the help. does someo,ne have an idea?
|||thanks hari I've fixed the problem
enterprise manager error
when launching the enterprise manager software, I'm getting the following me
ssage "title microsoft sql-dmo, error 126 : genral error". I could not find
informations onthis error in the help. does someo,ne have an idea?Hi,
You may need to re-register the SQL DMO dlls. Verify the below link:-
http://support.microsoft.com/?id=248241
Thanks
Hari
MCDBA
"erwan" <anonymous@.discussions.microsoft.com> wrote in message
news:7D9E5861-233F-4850-A7F2-888FB017E8E3@.microsoft.com...
> when launching the enterprise manager software, I'm getting the following
message "title microsoft sql-dmo, error 126 : genral error". I could not
find informations onthis error in the help. does someo,ne have an idea?|||thanks hari I've fixed the problem
ssage "title microsoft sql-dmo, error 126 : genral error". I could not find
informations onthis error in the help. does someo,ne have an idea?Hi,
You may need to re-register the SQL DMO dlls. Verify the below link:-
http://support.microsoft.com/?id=248241
Thanks
Hari
MCDBA
"erwan" <anonymous@.discussions.microsoft.com> wrote in message
news:7D9E5861-233F-4850-A7F2-888FB017E8E3@.microsoft.com...
> when launching the enterprise manager software, I'm getting the following
message "title microsoft sql-dmo, error 126 : genral error". I could not
find informations onthis error in the help. does someo,ne have an idea?|||thanks hari I've fixed the problem
Sunday, February 26, 2012
enterprise manager error
when launching the enterprise manager software, I'm getting the following message "title microsoft sql-dmo, error 126 : genral error". I could not find informations onthis error in the help. does someo,ne have an idea?Hi,
You may need to re-register the SQL DMO dlls. Verify the below link:-
http://support.microsoft.com/?id=248241
Thanks
Hari
MCDBA
"erwan" <anonymous@.discussions.microsoft.com> wrote in message
news:7D9E5861-233F-4850-A7F2-888FB017E8E3@.microsoft.com...
> when launching the enterprise manager software, I'm getting the following
message "title microsoft sql-dmo, error 126 : genral error". I could not
find informations onthis error in the help. does someo,ne have an idea?|||thanks hari I've fixed the problem
You may need to re-register the SQL DMO dlls. Verify the below link:-
http://support.microsoft.com/?id=248241
Thanks
Hari
MCDBA
"erwan" <anonymous@.discussions.microsoft.com> wrote in message
news:7D9E5861-233F-4850-A7F2-888FB017E8E3@.microsoft.com...
> when launching the enterprise manager software, I'm getting the following
message "title microsoft sql-dmo, error 126 : genral error". I could not
find informations onthis error in the help. does someo,ne have an idea?|||thanks hari I've fixed the problem
Subscribe to:
Posts (Atom)