Monday, March 19, 2012
I try to create a maintenance plan I am getting the error
Exception has been thrown by the target of an invocation. (mscorlib)
ADDITIONAL INFORMATION:
An OLE DB error 0x80004005 (Client unable to establish connection) occurred while enumerating packages. A SQL statement was issued
and failed.
An OLE DB error 0x80004005 (Client unable to establish connection) occurred while enumerating packages. A SQL statement was issued
and failed.
And evenlog message
The prelogin packet used to open the connection is structurally invalid; the connection has been closed. Please contact the vendor
of the client library. [CLIENT: <local machine>]
I am using Sql Server 2005 Developer Edition 9.0.1399.
I have searched around but cannot find.
Thank you for your help.
ZaferHi Zafer,
Welcome to use MSDN Managed Newsgroup Support.
From your description, my understanding of this issue is: When you create a
Maintenance plan in SQL Server Management Studio, you get the following
error:
An OLE DB error 0x80004005 (Client unable to establish connection) occurred
while enumerating packages. A SQL statement was issued and failed.
If I misunderstood your concern, please feel free to point it out.
Please verify that your server has a valid cert stored in
computer->personal.
On the SQL Server computer, create a Microsoft Management Console (MMC)
snap-in for the Certificates tool. To do this, follow these steps:
a. Click "Start", click "Run", type "mmc" (without the quotation marks)
in the
"Open" box, and then click "OK".
b. On the "File" menu, click "Add/Remove Snap-in".
c. Click "Add", click "Certificates", click "Add", click "Computer
account",
click "Next", click "Finish", click "Close", and then click "OK".
Also, you may check your SQL Server Service Account. If you run SQL Server
as local system, is this issue occur?
Hope this will be helpful!
Sincerely yours,
Wei Lu
Microsoft Online Partner Support
======================================================When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================This posting is provided "AS IS" with no warranties, and confers no rights.
Sunday, February 19, 2012
I need help please! My Exception Handling is not working.
I am using exception handling and Transaction handling combined.
The code is written to delete a record from 2 different table.
The purpose of using exception and transaction handling combined is tomake sure that the record is deleted in BOTH table. If there is errorwhile deleting a record from one of the tables, it will rollback thedatabase to the original and will stop deleting any record.
However, The Transaction handling is not working. When error occurswhile deleting a record on table A, the code still delete a record fromone table B. The transaction.RollBack() doesn't work. This is my code:
Try
Conn= NewSqlConnection(ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString)
Conn.Open()
Trans = sConn.BeginTransaction
For Each row In GridView1.Rows
Dim sql As String = "SELECT * FROM Member
Using Cmd As New SqlCommand(sql, Conn, Trans)
SqlDataSource1.DeleteParameters("MemberID").DefaultValue =DropDownListMember.SelectedValue
SqlDataSource1.Delete()
SqlDataSource2.DeleteParameters("CarID").DefaultValue =DropDownListCar.SelectedValue
SqlDataSource2.Delete()
End Using
End If
Next
sTrans.Commit()
Label1.Text = "deleted."
Catch ex As Exception
If sTrans IsNot Nothing Then
sTrans.Rollback()
End If
Label1.Text = "error"
Return
Finally
If sConn IsNot Nothing Then
sConn.Close()
End If
End Try
soo much thanks in advanced!!!got my question answered!
I found it myself by trying change the codes. thanks all! (?)