SqlException Unhandled In Custom Membership Provider??

Dec 14, 2006

can someone help me in this???? this function is throwing exception "sqlException unhandled in user code"."incorrect syntax near ?" 

 

 

Public Overrides Sub UpdateUser(ByVal us As System.Web.Security.MembershipUser)

Dim conn As New SqlConnection(connStr)

Dim cmd As New SqlCommand("UPDATE users SET firstname = ?, lastname = ?, company= ?, address= ?, state= ? WHERE Username = ?", conn)

Dim u As User = CType(us, User)

cmd.Parameters.Add("@firstname", SqlDbType.VarChar, 50).Value = u.FirstName

cmd.Parameters.Add("@lastname", SqlDbType.VarChar, 50).Value = u.LastName

cmd.Parameters.Add("@company", SqlDbType.VarChar, 50).Value = u.Company

cmd.Parameters.Add("@address", SqlDbType.NVarChar, 200).Value = u.Address

cmd.Parameters.Add("@state", SqlDbType.VarChar, 50).Value = u.State

cmd.Parameters.Add("@Username", SqlDbType.NVarChar, 64).Value = u.UserName

Try

conn.Open()

cmd.ExecuteNonQuery()

Catch e As SqlException

Throw e

'Throw New Exception("Some Error occured during updation...")

Finally

conn.Close()

End Try

End Sub

View 11 Replies


ADVERTISEMENT

SQLException Unhandled By User Code

Jan 30, 2008

Cannot insert the value NULL into column 'PortfolioID', table 'SazamaBuilders.dbo.Portfolio'; column does not allow nulls. INSERT fails.The statement has been terminated.
 Looking for help with the correcting this.
This is the complete error message I am receiving. When debugging and I try to save something the error comes up right next to objportfolio.Save(). The following is my code for the save button:Protected Sub btnSave_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSave.Click
 
If Page.IsValid ThenDim objportfolio As New BusinessObjects.Portfolio
objportfolio.LoadByPrimaryKey(ViewState("ItemID"))
If objportfolio.es.HasData = False Then
objportfolio.AddNew()
End IfWith objportfolio
.portfolioName = Me.txtportfolioName.Text
' See if the directory is there, if not, create one
If IO.Directory.Exists(Server.MapPath("../Gallery/")) = False ThenIO.Directory.CreateDirectory(Server.MapPath("../Gallery/"))
End If
If Me.FileUpload1.HasFile ThenMe.FileUpload1.SaveAs(Server.MapPath("../Gallery/" & Me.FileUpload1.FileName))
.Filename = Me.FileUpload1.FileName
End If
End With
'Now save the portfolio
objportfolio.Save()
'Cleanup
objportfolio = NothingResponse.Redirect("./manage_portfolio.aspx")
End If
 
End Sub
 
 

View 3 Replies View Related

An Unhandled Exception Occurred During The System.Data.SqlClient.SqlException: Login Failed For User 'IT-CELLIWAM_IT-SERVER'.

Sep 30, 2004

While making a connection to a SQL server Enterprise Database using ASP.Net(C#), during execution of .aspx file i got the following error :-

Kindly help me if anybody knows the solution .

Thanks in advance


Login failed for user 'IT-CELLIWAM_IT-SERVER'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'IT-CELLIWAM_IT-SERVER'.

Source Error:


Line 52: //mycommand.SelectCommand.CommandType=CommandType.StoredProcedure;
Line 53: DataSet ds=new DataSet();
Line 54: mycommand.Fill(ds);
Line 55: DataTable dt;
Line 56: dt=new DataTable();


Source File: c:inetpubwwwrootetapplogin.aspx.cs Line: 54

Stack Trace:


[SqlException: Login failed for user 'IT-CELLIWAM_IT-SERVER'.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +484
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState) +44
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38
netapp.login.Page_Load(Object sender, EventArgs e) in c:inetpubwwwrootetapplogin.aspx.cs:54
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731

View 2 Replies View Related

Cant Connect To Membership Provider Db

Sep 10, 2007

 I've started developing an ASP.net 2.0 app with VWD Express.The default membership provider db of SQL Server 5005 Express is not installed on my host servers. So my workaround has been to use a Full blown SQL Server 2005 DB as a custom membership provider declared in web.config. This works fine on the production server. However, when i try to login from my development app I get Exception # 40 can't connect to SQL server membership provider.. Moreover, my app configuration confirms there is problems connecting to this server in my development environment. How can I solve this and bring my development app up & running again? many thanks 

View 1 Replies View Related

Membership Data Provider

May 23, 2006

I created a membership database on my local computer. DB is SQL Server 2005. I created create sripts for that database and created this database in a SQL Server 2000 instance on another box.As soon as I changed my web.config file
to point to the new database, I got this error below. What is causing
it?The 'System.Web.Security.SqlMembershipProvider' requires a
database schema compatible with schema version '1'.  However, the
current database schema is not compatible with this version.  You may
need to either install a compatible schema with aspnet_regsql.exe
(available in the framework installation directory), or upgrade the
provider to a newer version.Do I have to create a local Membership database in a SQL 2000 instance, script it out and then create in the other box?Thanks

View 1 Replies View Related

Sql Server And Membership Provider

Feb 19, 2006

Hello all,I need help with sql server which i was wondering if someone can shedsome light on my problemThe problem:Hello all,I need help with sql server which i was wondering if someone can shedsome light on my problemThe problem:i am using .net 2.0 membership provider interface to provide amembership in my website...now i also am using the sql server 2005 forthe backbone of the site..now when a new user is created theirinformation is saved into asp_ membership and their userid isautomactially saved into another table called asp_users...now these aredefaults by membership provider...what i would like to do is to createanother table which i have called "Rank" and i would a column in this"rank" table that would keep the user ids, now i have noticed that theasp_user.UserId has a releationship with asp_Membership.userId so when anew user is created asp_user.Userid automactially gets updated..i havecreated a colum called Rank.UserId which has a relationship withasp_users.userid and asp_membershi.Userid but it doesnot get updatedautomatically when a new user is created...what can i do so i can havethis table "Rank" also gets updated automactially as soon a a new useris created or a user has been deleted...just like asp_users gets updated...thanks in advance---Best RegardsAmir---Best RegardsAmir*** Sent via Developersdex http://www.developersdex.com ***

View 1 Replies View Related

Renaming Membership Provider Tables

Nov 15, 2007

Hi, this might be a newbie question as I don't know too much about databases.My web host only lets me have 1 database, so I am trying to rename all the tables with a prefix, then import them to the server. I'm using MsSql-2005, VWD, Management Studio Express.My error when I run the .sql script is:Msg 208, Level 16, State 1, Procedure vw_aspnet_MembershipUsers, Line 3Invalid object name 'dbo.aspnet_Membership'.Msg 208, Level 16, State 1, Procedure vw_aspnet_Users, Line 3Invalid object name 'dbo.aspnet_Users'.Msg 208, Level 16, State 1, Procedure vw_aspnet_Profiles, Line 3Invalid object name 'dbo.aspnet_Profile'....I suspect that it is because I renamed the "aspnet_Membership" table to "Company1_aspnet_Membership" (I made a database diagram, then renamed the aspnet tables in Properties). Has anyone run into this before? Does anyone know how to fix it? 

View 5 Replies View Related

Custom Log Provider Type Not Recognized As A Valid Log Provider

Mar 13, 2006

I am new to SSIS but I am learning fast. Any help is greatly appreciated.

I have written a custom log provider derived from LogProviderBase. I want to programmtically add the custom log provider to my package, but when I try this:

myPackage.LogProviders.Add("ACustomLogProvider");

I get the following exception:

"The log provider type "ACustomLogProvider" specified for log provider "{..GUID..}" is not recognized as a valid log provider type. This error occurs when an attempt is made to create a log provider for unknown log provider type. Verify the spelling in the log provider type name".

I have followed the instructions in BOL and as suggested in this forum, adding the DtsLogProvider attribute:

[DtsLogProvider(DisplayName="ACustomLogProvider", LogProviderType="ACustomLogProvider", Description="a description")]

Another way I tried is that I added a GUID attribute to my custom log provider class and then tried this:

Type aType = typeof(ACustomLogProvider);

Guid aGUID = (Guid)aType.GUID;

myPackage.LogProviders.Add("{"+ aGUID.ToString() +"}");

This also gives me the same exception "The log provider type ""{..the actual GUID for ACustomLogProvider..}" specified for log provider "{..a different GUID..}" is not recognized as a valid log provider type....

My questions are: Is it possible to add a custom log provider programmtically or must it be done through the SSIS Designer?

Must I deploy my custom log provider class for it to work programmatically? (I had perhaps wrongly assumed I would not have to deploy if I don't want it to show up in the SSIS Designer).

I would prefer to use a custom log provider instead of just logging within the SSIS event handlers because I can override the OnPostExecute, etc. but I cannot (can I?) override the specific event handlers like PackageStart, PackageEnd, etc because they are not exposed through DTSEvents.

Any help I would be very grateful for. Thanks.

View 8 Replies View Related

Membership Provider Without A ConnectionString Value Hardcoded In Web.Config?

Jan 4, 2008

I have an application where I need to store the connectionstring not hardcoded in Web.config but in HttpRuntimeCache.However I want to use the membership provider which is normally set up to look for the connection string in a node of web.config.Is it possible to create a membership provider that doesn't need to get a connectionstring from Web.Config? Or looking at it a different way... Is it possible to have a connectionString setting in Web.Config where the value isn't hardcoded but looked up from HttpRuntimeCache?Thanks.

View 1 Replies View Related

Java.sql.SQLException: Could Not Get The Data Of The Row From The OLE DB Provider 'SQLOLEDB'

Mar 27, 2007

Windows Server 2003 R2 Enterprise x64 Edition service pack 1
SQL Server 2000 Enterprise edition 32 bit, SP4 : 2000.8.00.2039

jdbc driver: jtds
connection string: jdbc:jtdsqlserver://ZH-DATA-4:1434/[dbname];instance=[instance name]

the connectivity works fine...almost.

I have 2 identical sql servers one of which is linked to the other via a linked server config which for one particular query gives back the error I give in the subject of this thread:
java.sql.SQLException: Could not get the data of the row from the OLE DB provider 'SQLOLEDB'

if I run the exact same sql string in query analyser it runs with no problem.
if have similar queries also running from java which use the linked server and these do not give an error. I am at a loss as to explain why this is happening.

the query in question joins together a number of views which reference the linked server.

I have tried everything I can think of including recreating the views and linked server definition.
If all is OK in query analyser, how can it fail when called over jbdc (especially when all other db requests succeed) ?

View 1 Replies View Related

Custom Log Provider - Not Recognised.

Feb 15, 2007

Hi All,

I have a tricky one for you...

1. I create a custom log provider on machine A.

2. I deploy the signed assembly to the../../DTS/90/LogProviders directory & the GAC on both machine A & machine B.

3. I create a new package on machine A & go to enable logging for this new custom provider: I find it in the drop-down list of providers, and I can add it successfully.

4. I create a new package on machine B & go to enable logging for this new custom provider: I find it in the drop-down list of providers, but I can't add it. I get the following error:

'...failed to create log provider...the log provider type "_" specified for log provider "_" is not recognized as a valid log provider type. This occurs when an attempt is made to create a log provider for an unknown log provider type. Verify the spelling in the log provider type name (package)."



Any ideas anyone??

Tamim.

View 5 Replies View Related

Create A Custom SSIS Log Provider

Jan 18, 2008

I created a SSIS log provider derived from LogProviderBase, it's appear in my VS2005 and work fine, the only one problem is, there is not a dropdown list of connections in the SSIS Log Configuration column, how can I add it?

http://technet.microsoft.com/en-us/library/ms403361.aspx

thanks

View 6 Replies View Related

Custom Log Provider - Notification Services

Jan 20, 2006

Hi...

I am trying to do custom log provider that will post events to Notification Services...The idea is that if I could post the "SSIS events" to Notification Services, with a Custom Delivery Channel in NS, I would be able to do NS Subscriptions with real time monitoring of SSIS packages..

I have tried to use the sample custom log provider code in MSDN. The problem is after I added the custom log provider dll to the C:Program FilesMicrosoft SQL Server90DTSLogProviders folder and install to global assembly using gacutil...

The custom log provider is not showing up in the Provider Type under Configure SSIS logs...

View 7 Replies View Related

Access To Variables In Custom Log Provider?

Jun 29, 2006

Hello,

I found one post from the past asking this question, but didn't see an answer, so I am hoping someone can shed some more light on it:

I am writing a custom log provider in C#. Is it possible give this custom log provider access to the variables collection (via a variabledispenser object)? First glance at the log provider classes would tell me that this is not possible, though I would like confirmation. Also, if I am correct in thinking it is not possible, what was the reason for leaving this out?

Thanks!

View 3 Replies View Related

Accessing A Package's Variables From Within A Custom Log Provider...or Not...

Feb 21, 2007

Hi,

Given that Task.Validate() exposes the package's VariableDispenser, but LogProviderBase.Validate() doesn't...

http://msdn2.microsoft.com/fr-fr/library/microsoft.sqlserver.dts.runtime.task.validate.aspx

http://msdn2.microsoft.com/fr-fr/library/microsoft.sqlserver.dts.runtime.logproviderbase.validate.aspx

...I guess that simply means that I can't access a package's variables within a custom log provider? Can anyone comment/confirm? Any other options/routes to achieving the same..?

We live in hope,

Tamim.

View 3 Replies View Related

Accessing Variables Collection From A Custom Log Provider

Oct 1, 2007



As far as I can make out it is not possible to access the variables collection from a custom log provider.

I'm interested to know what the rationale for this is. Why aren't the variables available for logging purposes?

Thanks
Jamie

[Microsoft follow-up]

View 6 Replies View Related

Reading Package Variables From Custom Log Provider

Oct 1, 2007

I am interested in determining if package variables can be read from a custom log provider. I am able to pass the values into the custom log provider using an expression in a custom connection manager. My intention is to used the values of these variables upon package failure so I can capture the context of the failure. Unfortunately, if the value of the variable is changed at runtime, this update is not reflected in the custom log provider.

Is it possible to get direct access to the package variables from the custom log provider?

Thanks,
Marc

View 1 Replies View Related

Custom Role Provider Everthing Working Except Roles???

Apr 25, 2007

Hello Everyone,
I am trying to use a custom role provider, the main purpose so that I don't have to use a database file. My web.config file is posted below. My problem is that I think I have followed all the steps to create a custom role provider using both articles on MSDN and some written by Scott Gu. After Modifying my web.config file I went to the asp.net configuration to test the connection. Users are created in the remote database but roles are being picked up and created in the App_Data folder. Can anyone give me a hint at what I am doing wrong? thanks in advance.
<?xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
WindowsMicrosoft.NetFrameworkv2.xConfig
-->
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<appSettings/>
<connectionStrings>
<add name="MyConnectionString" connectionString="Data Source=10.10.10.10;Database=MyDataBase;Persist Security Info=True;User ID=user;Password=password" providerName="System.Data.SqlClient"/>
</connectionStrings>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<roleManager enabled="true"/>
<membership defaultProvider="CustomSQLRoleManager">
<providers>
<clear/>
<add name="CustomSQLRoleManager"
type="System.Web.Security.SqlMembershipProvider"
connectionStringName="MyConnectionString"
applicationName="MyAppllicationName"
minRequiredPasswordLength="6"
minRequiredNonalphanumericCharacters="0"
requiresQuestionAndAnswer="false"
requiresUniqueEmail="true"/>
</providers>
</membership>
<compilation debug="true">
<assemblies>
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies></compilation>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Forms"/>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
</system.web>
</configuration>

View 2 Replies View Related

Proper Way To Rename ASPNETDB.MDF? Custom Provider The Solution?

Jan 28, 2006

ASP.NET 2.0....
What is the proper way to rename the ASPNETDB.MDF to another name, such as TEST_ASPNETDB.MDF?
I know you can rename the db in the IDE, BUT, there are other places you need to change so that ASPNETDB.MDF isn't recreated.  Do I have to make a custom SQLExpress provider or something to that effect?
Any examples?  Thanks...

View 2 Replies View Related

Using Connection Managers Inside Custom Log Provider Failing!

Apr 3, 2006

Hi,

I'm trying to use an OLE DB connection manager from inside a custom log provider, but can't get the code to work - I get an exception "A first chance exception of type 'System.InvalidCastException' occurred in SSEALogProvider.dll" on the last line of the code below.

I know the connection is OLE DB from looking at .CreationName.

I've tried both with & without ToConnectionManager90(), but appearently not in the right way, both cases gives the same exception.

Any tips on what I'm missing? All the examples I've seen are either creating (instead of using) connection managers, or are file based connection managers. Any and all help much appreciated!



Thanks/Kristian



if (this.ConfigString.Length == 0 || connections.Contains(ConfigString) == false ||

connections[ConfigString].CreationName != "OLEDB")

{

infoEvents.FireError(0, "SSEALogProvider", "The ConnectionManager " + ConfigString + " specified in the ConfigString property cannot be found in the collection, or is of the wrong type (expected CreationName='OLEDB'.)", "", 0);

return Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure;

}

else

[...]



public override void OpenLog()

{

if (!connections.Contains(this.ConfigString))

throw new Exception("The ConnectionManager " + this.ConfigString + " does not exist in the Connections collection.");

ConnectionManager connectionManager = connections[ConfigString];

IDTSConnectionManager90 connectionManager90 = DtsConvert.ToConnectionManager90(connectionManager);

object connObj = connectionManager90.AcquireConnection(null);

//ConnectionManagerOleDb connectionManagerOleDb = (ConnectionManagerOleDb)(connectionManager.InnerObject);

//object connObj = connectionManagerOleDb.AcquireConnection(null);

if (connObj == null)

{

events.FireError(0, "SSEALogProvider", "Could not connect to the log database with connection string " + ConfigString + ".", "", 0);

return;

}

// Exception on next line: "A first chance exception of type 'System.InvalidCastException' occurred in SSEALogProvider.dll"

OleDbConnection oledbConnection = (OleDbConnection)connObj;

View 3 Replies View Related

Package With A Custom Component (log Provider) Runs In BIDS, But Doesn't Run Where Deployed.

Feb 14, 2007

Hi,

I have a package with a custom log provider, which runs in BIDS. However when I deploy the package onto SQL Server and run it on the deployed machine, if fails:



"failed to decrypt protected XML node DTS:Password...key not valid for use in specified state..."

Now this is definately to do with the custom log, as if I take it out & redeploy, I can run it on the deplyed server + also run it within a job. I have entered the custom log provider library (+ other required DLLs) in the GAC on the deployed machine, but I'm clearly missing something.

Any ideas pls??? I'm really stuck.

Many thanks in advance,

Tamim.

View 3 Replies View Related

Using Membership UserId Guids With SqlParameters (Membership UserId Guid)

May 7, 2008

In my site, when a user registers, I need to create rows in additional tables besides aspnet_Users. So, I need to be able to pass the generated userId guid to subsequent SqlCommands. I'm having a terrible time with this. What's the correct way to set up a SqlParameter so that it will accept a guid? I keep getting this error: "Conversion failed when converting from a character string to uniqueidentifier."
I've tried creating the parameter both with and without a SqlDbType.
cmd.Parameters.AddWithValue(paramName, guid);
and
SqlParameter p = new SqlParameter(paramName);p.SqlDbType = SqlDbType.Guid;cmd.Parameters.Add(p);
and I get the same error either way.
Driving me nuts! Any help appreciated.

View 1 Replies View Related

Unhandled InvalidOperationException

Dec 18, 2005

I have a database table called Qlinks, with two columns, URL and Name. This table is displayed on a form also called qlinks, in a details view. When I try to save data after i've deleted a row of the table, O get a yellow po-up telling me that the InvalidOperationException was unhandled. The error is "Update requires a valid DeleteCommand when passed DataRow collection with deleted rows." Please try to help, I am just a beginning programmer who doesn't know much. Code samples greatly appreciated. Thanks in advance.

View 3 Replies View Related

System.MissingMethodException Was Unhandled

Jun 19, 2007

I€™m developing a smart device application using VB.net 2005

First I created a class project containing a simple function

I built the project and added it as a reference in a smart device project (as a dll file)

The problem is when trying to use this dll reference I get this message (in a message box):

There is no source code available for the current location

Then I get this error message:

System.MissingMethodException was unhandled
Message="File or assembly name 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089', or one of its dependencies, was not found."
StackTrace:
at System.Windows.Forms.Control.OnClick()
at System.Windows.Forms.Button.OnClick()
at System.Windows.Forms.ButtonBase.WnProc()
at System.Windows.Forms.Control._InternalWnProc()
at Microsoft.AGL.Forms.EVL.EnterMainLoop()
at System.Windows.Forms.Application.Run()
at AdvWorksMobile.VendorList.Main()
Please can someone tell me what is the mean of this error and how to solve it

Thank u for your help

View 1 Replies View Related

Unhandled Exception In Mmc.exe: : Access Violation

Dec 19, 2005

Hi all,Since yesterday I'm unable to lauch the enterprise manager, it givesthe following error :Unhandled exception at 0x0101f07e in mmc.exe: 0xC0000005: Accessviolation reading location 0x00000064.The weird thing is that except installing the office xp PIA's I can'timage what else could be changed on my system.I tried reinstalling, but still the same error.I tried SP3a, still nothing changed.Searched in some groups and it seems that not much can be found aboutit, so my inspiration is running dry.Anyone had this problem ? Anyone any suggestions how to solve it ?Regards,Koen

View 2 Replies View Related

SQL 2005 Unhandled Exception Error

Nov 23, 2005

Hi,I have installed SQL 2005 RTM on a new server and I keep getting thiserror (described below) quite frequently. Was wondering if anyone has aclue on what's happening here. I tried googling but no success!This generally happens when I am browsing the tree in Object explorerin SQL 2005 Management Studio. I can be doing anything - like viewingdatabases, or viewing table list or viewing stored procedure list, etc.I get the following error (screenshot in URL link)http://img5.imageshack.us/img5/6274/sql2005error3vt.jpgWhen this happens and I click Continue, I can work in Management Studiolike queries, etc. - the summary window appears blank though. It doeshowever refresh the count of items in the list but the main windowdisplays no table list or view list or sp list (whatever the case maybe). Screen shot link:http://img5.imageshack.us/img5/6076...05error21yu.jpgAny ideas???Thanks in advance for all your help!VishalText if message when I click on the Details Button:See the end of this message for details on invokingjust-in-time (JIT) debugging instead of this dialog box.************** Exception Text **************System.ArgumentOutOfRangeException: InvalidArgument=Value of '5' is notvalid for 'index'.Parameter name: indexatSystem.Windows.Forms.ListView.ListViewItemCollecti on.get_Item(Int32index)at System.Windows.Forms.ListView.set_VirtualListSize( Int32 value)atMicrosoft.SqlServer.Management.UI.VSIntegration.Ap pIDPackage.RightPaneListViewer.set_VirtualListSize (Int32value)atMicrosoft.SqlServer.Management.UI.VSIntegration.Ap pIDPackage.RightPaneListViewer.PopulateView()atMicrosoft.SqlServer.Management.UI.VSIntegration.Ap pIDPackage.RightPaneListViewer.Microsoft.SqlServer .Management.UI.VSIntegration.AppIDPackage.IReportV iew.SetReportSource(ReportSourcereportSource)atMicrosoft.SqlServer.Management.UI.VSIntegration.Ap pIDPackage.RightPaneControl.InternalSetReportSourc e(ReportSourcereportSource, IReportView newView)************** Loaded Assemblies **************mscorlibAssembly Version: 2.0.0.0Win32 Version: 2.0.50727.42 (RTM.050727-4200)CodeBase:file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll----------------------------------------AppIDPackageAssembly Version: 9.0.242.0Win32 Version: 9.00.1399.00CodeBase:file:///C:/Program%20Files/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/AppIDPackage.DLL----------------------------------------SystemAssembly Version: 2.0.0.0Win32 Version: 2.0.50727.42 (RTM.050727-4200)CodeBase:file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll----------------------------------------Microsoft.SqlServer.SqlTools.VSIntegrationAssembly Version: 9.0.242.0Win32 Version: 9.00.1399.00CodeBase:file:///C:/Program%20Files/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/Microsoft.SqlServer.SqlTools.VSIntegration.DLL----------------------------------------Microsoft.VisualStudio.Shell.InteropAssembly Version: 7.1.40304.0Win32 Version: 7.0.4054CodeBase:file:///C:/WINDOWS/assembly/GAC/Microsoft.VisualStudio.Shell.Interop/7.1.40304.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Shell.Interop.dll----------------------------------------Microsoft.VisualStudio.OLE.InteropAssembly Version: 7.1.40304.0Win32 Version: 7.0.4054CodeBase:file:///C:/WINDOWS/assembly/GAC/Microsoft.VisualStudio.OLE.Interop/7.1.40304.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.OLE.Interop.dll----------------------------------------System.Windows.FormsAssembly Version: 2.0.0.0Win32 Version: 2.0.50727.42 (RTM.050727-4200)CodeBase:file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll----------------------------------------System.DrawingAssembly Version: 2.0.0.0Win32 Version: 2.0.50727.42 (RTM.050727-4200)CodeBase:file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll----------------------------------------Microsoft.SqlServer.SqlTDiagMAssembly Version: 9.0.242.0Win32 Version: 9.00.1399.00CodeBase:file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.SqlServer.SqlTDiagM/9.0.242.0__89845dcd8080cc91/Microsoft.SqlServer.SqlTDiagM.dll----------------------------------------Microsoft.DataWarehouse.SQMAssembly Version: 9.0.242.0Win32 Version: 9.00.1399.00CodeBase:file:///C:/Program%20Files/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/Microsoft.DataWarehouse.SQM.DLL----------------------------------------Microsoft.SqlServer.InstapiAssembly Version: 9.0.242.0Win32 Version: 9.00.1399.00CodeBase:file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.SqlServer.Instapi/9.0.242.0__89845dcd8080cc91/Microsoft.SqlServer.Instapi.dll----------------------------------------ObjectExplorerAssembly Version: 9.0.242.0Win32 Version: 9.00.1399.00CodeBase:file:///C:/Program%20Files/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/ObjectExplorer.DLL----------------------------------------ConnectionDlgAssembly Version: 9.0.242.0Win32 Version: 9.00.1399.00CodeBase:file:///C:/Program%20Files/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/ConnectionDlg.DLL----------------------------------------SqlWorkbench.InterfacesAssembly Version: 9.0.242.0Win32 Version: 9.00.1399.00CodeBase:file:///C:/Program%20Files/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/SqlWorkbench.Interfaces.DLL----------------------------------------Microsoft.SqlServer.CustomControlsAssembly Version: 9.0.242.0Win32 Version: 9.00.1399.00CodeBase:file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.SqlServer.CustomControls/9.0.242.0__89845dcd8080cc91/Microsoft.SqlServer.CustomControls.dll----------------------------------------AccessibilityAssembly Version: 2.0.0.0Win32 Version: 2.0.50727.42 (RTM.050727-4200)CodeBase:file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll----------------------------------------SqlMgmtAssembly Version: 9.0.242.0Win32 Version: 9.00.1399.00CodeBase:file:///C:/Program%20Files/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/SqlMgmt.DLL----------------------------------------Microsoft.SqlServer.RegSvrEnumAssembly Version: 9.0.242.0Win32 Version: 9.00.1399.00CodeBase:file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.SqlServer.RegSvrEnum/9.0.242.0__89845dcd8080cc91/Microsoft.SqlServer.RegSvrEnum.dll----------------------------------------EnvDTEAssembly Version: 8.0.0.0Win32 Version: 8.0.50727.42 (RTM.050727-4200)CodeBase:file:///C:/WINDOWS/assembly/GAC/EnvDTE/8.0.0.0__b03f5f7f11d50a3a/EnvDTE.dll----------------------------------------Microsoft.NetEnterpriseServers.ExceptionMessageBox Assembly Version: 9.0.242.0Win32 Version: 9.00.1399.00CodeBase:file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.NetEnterpriseServers.ExceptionMessageBox /9.0.242.0__89845dcd8080cc91/Microsoft.NetEnterpriseServers.ExceptionMessageBox .dll----------------------------------------System.DataAssembly Version: 2.0.0.0Win32 Version: 2.0.50727.42 (RTM.050727-4200)CodeBase:file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll----------------------------------------Microsoft.SqlServer.ConnectionInfoAssembly Version: 9.0.242.0Win32 Version: 9.00.1399.00CodeBase:file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.SqlServer.ConnectionInfo/9.0.242.0__89845dcd8080cc91/Microsoft.SqlServer.ConnectionInfo.dll----------------------------------------System.XmlAssembly Version: 2.0.0.0Win32 Version: 2.0.50727.42 (RTM.050727-4200)CodeBase:file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll----------------------------------------Microsoft.SqlServer.SmoEnumAssembly Version: 9.0.242.0Win32 Version: 9.00.1399.00CodeBase:file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.SqlServer.SmoEnum/9.0.242.0__89845dcd8080cc91/Microsoft.SqlServer.SmoEnum.dll----------------------------------------System.ConfigurationAssembly Version: 2.0.0.0Win32 Version: 2.0.50727.42 (RTM.050727-4200)CodeBase:file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll----------------------------------------System.TransactionsAssembly Version: 2.0.0.0Win32 Version: 2.0.50727.42 (RTM.050727-4200)CodeBase:file:///C:/WINDOWS/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll----------------------------------------System.EnterpriseServicesAssembly Version: 2.0.0.0Win32 Version: 2.0.50727.42 (RTM.050727-4200)CodeBase:file:///C:/WINDOWS/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll----------------------------------------Microsoft.SqlServer.SmoAssembly Version: 9.0.242.0Win32 Version: 9.00.1399.00CodeBase:file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.SqlServer.Smo/9.0.242.0__89845dcd8080cc91/Microsoft.SqlServer.Smo.dll----------------------------------------Microsoft.SqlServer.SqlEnumAssembly Version: 9.0.242.0Win32 Version: 9.00.1399.00CodeBase:file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.SqlServer.SqlEnum/9.0.242.0__89845dcd8080cc91/Microsoft.SqlServer.SqlEnum.dll----------------------------------------Microsoft.SqlServer.BatchParserAssembly Version: 9.0.242.0Win32 Version: 2005.090.1399.00CodeBase:file:///C:/WINDOWS/assembly/GAC_32/Microsoft.SqlServer.BatchParser/9.0.242.0__89845dcd8080cc91/Microsoft.SqlServer.BatchParser.dll----------------------------------------msvcm80Assembly Version: 8.0.50608.0Win32 Version: 8.00.50727.42CodeBase:file:///C:/WINDOWS/WinSxS/x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727. 42_x-ww_0de06acd/msvcm80.dll----------------------------------------ObjectExplorerReplicationAssembly Version: 9.0.242.0Win32 Version: 9.00.1399.00CodeBase:file:///C:/Program%20Files/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/ObjectExplorerReplication.DLL----------------------------------------Microsoft.ReportViewer.WinFormsAssembly Version: 8.0.0.0Win32 Version: 8.0.50727.42CodeBase:file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.ReportViewer.WinForms/8.0.0.0__b03f5f7f11d50a3a/Microsoft.ReportViewer.WinForms.dll----------------------------------------System.ManagementAssembly Version: 2.0.0.0Win32 Version: 2.0.50727.42 (RTM.050727-4200)CodeBase:file:///C:/WINDOWS/assembly/GAC_MSIL/System.Management/2.0.0.0__b03f5f7f11d50a3a/System.Management.dll----------------------------------------SQLEditorsAssembly Version: 9.0.242.0Win32 Version: 9.00.1399.00CodeBase:file:///C:/Program%20Files/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/SQLEditors.DLL----------------------------------------Microsoft.VisualStudio.TextManager.InteropAssembly Version: 7.1.40304.0Win32 Version: 7.0.4054CodeBase:file:///C:/WINDOWS/assembly/GAC/Microsoft.VisualStudio.TextManager.Interop/7.1.40304.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.TextManager.Interop.dll----------------------------------------************** JIT Debugging **************To enable just-in-time (JIT) debugging, the .config file for thisapplication or computer (machine.config) must have thejitDebugging value set in the system.windows.forms section.The application must also be compiled with debuggingenabled.For example:<configuration><system.windows.forms jitDebugging="true" /></configuration>When JIT debugging is enabled, any unhandled exceptionwill be sent to the JIT debugger registered on the computerrather than be handled by this dialog box.

View 1 Replies View Related

RSConfigTool.exe Unhandled Exception After Patching SP2

Mar 15, 2007

After patching SQL2005 SP2, an unhandled exception occurred in RSConfigTool.exe.

The error message:

Unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately.

Not found.

Is this a known issue? Thanks.



See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Management.ManagementException: Not found
at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)
at System.Management.PropertyData.RefreshPropertyInfo()
at System.Management.PropertyDataCollection.get_Item(String propertyName)
at System.Management.ManagementBaseObject.GetPropertyValue(String propertyName)
at System.Management.ManagementBaseObject.get_Item(String propertyName)
at ReportServicesConfigUI.WMIProvider.RSReportServerAdmin.get_IsSharePointIntegrated()
at ReportServicesConfigUI.ConfigurationManager.ResetStepStatus()
at ReportServicesConfigUI.ConfigurationManager.ChangeMachine()
at ReportServicesConfigUI.ConfigurationManager.LaunchDialog()
at ReportServicesConfigUI.ConfigurationManager.tsbConnect_Click(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
RSConfigTool
Assembly Version: 9.0.242.0
Win32 Version: 9.00.3042.00
CodeBase: file:///C:/Program%20Files/Microsoft%20SQL%20Server/90/Tools/binn/RSConfigTool.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Management
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Management/2.0.0.0__b03f5f7f11d50a3a/System.Management.dll
----------------------------------------
System.ServiceProcess
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.ServiceProcess/2.0.0.0__b03f5f7f11d50a3a/System.ServiceProcess.dll
----------------------------------------
System.DirectoryServices
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.DirectoryServices/2.0.0.0__b03f5f7f11d50a3a/System.DirectoryServices.dll
----------------------------------------
System.Data
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Transactions
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
System.EnterpriseServices
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------
Accessibility
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.


View 6 Replies View Related

An Unhandled Exception Occurred In Reporting Services

Apr 21, 2008

Hi,

I am getting below error in the event Log after followed by a Event saying Database stopped. Can anybody tell me the resolution for this error.

Below is the system info
1. Microsoft Windows Server 2003 Enterprise Edition Service Pack 2
2. .Net Framework 2.0


Event Type: Warning
Event Source: ASP.NET 2.0.50727.0
Event Category: Web Event
Event ID: 1309
Date: 3/28/2008
Time: 1:55:46 AM
User: N/A
Computer: HostMachine
Description:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 3/28/2008 1:55:46 AM
Event time (UTC): 3/28/2008 8:55:46 AM
Event ID: 6651c52c0a7a45c2bcc904514bab99f2
Event sequence: 68
Event occurrence: 1
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/1/root/Reports-1-128511680648122031
Trust level: RosettaMgr
Application Virtual Path: /Reports
Application Path: D:Program FilesMicrosoft SQL ServerMSSQL.1Reporting ServicesReportManager
Machine name: HostMachine

Process information:
Process ID: 2096
Process name: w3wp.exe
Account name: NT AUTHORITYNETWORK SERVICE

Exception information:
Exception type: ReportServerException
Exception message: Execution 'aogqmz45z4at1q3oui2elc55' cannot be found (rsExecutionNotFound)

Request information:
Request URL: http://ViewReports/Reports/Reserved.ReportViewerWebControl.axd?ReportSession=aogqmz45z4at1q3oui2elc55&ControlID=1ff944bddbce45f9860fdf44300bf3bf&Culture=1033&UICulture=9&ReportStack=1&OpType=SessionKeepAlive&TimerMethod=KeepAliveMethodctl141TouchSession0&CacheSeed=Fri Mar 28 01:39:34 2008
Request path: /Reports/Reserved.ReportViewerWebControl.axd
User host address: 172.19.97.233
User: Valid User
Is authenticated: True
Authentication Type: Negotiate
Thread account name: NT AUTHORITYNETWORK SERVICE

Thread information:
Thread ID: 15
Thread account name: NT AUTHORITYNETWORK SERVICE
Is impersonating: True
Stack trace: at Microsoft.Reporting.WebForms.ServerReport.GetExecutionInfo()
at Microsoft.Reporting.WebForms.ServerReport.SetExecutionId(String executionId, Boolean fullReportLoad)
at Microsoft.Reporting.WebForms.ServerReport.LoadFromUrlQuery(NameValueCollection requestParameters, Boolean fullReportLoad)
at Microsoft.Reporting.WebForms.ReportDataOperation..ctor()
at Microsoft.Reporting.WebForms.HttpHandler.GetHandler(String operationType)
at Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)


Custom event details:
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.


Aditya

View 1 Replies View Related

Displaying Custom Properties For Custom Transformation In Custom UI

Mar 8, 2007

Hi,

I am creating a custom transformation component, and a custom user interface for that component.

In
my custom UI, I want to show the custom properties, and allow users to
edit these properties similar to how the advanced editor shows the
properties.

I know in my UI I need to create a "Property Grid".
In
the properties of this grid, I can select the object I want to display
data for, however, the only objects that appear are the objects that I
have already created within this UI, and not the actual component
object with the custom properties.

How do I go about getting the properties for my transformation component listed in this property grid?

I am writing in C#.

View 5 Replies View Related

An Unhandled Win32 Exception Occurred In DtsDebugHost.exe[3172]

Dec 5, 2007


can somebody advice me on this error.


An Unhandled win32 exception occurred in DtsDebugHost.exe[3172]

Thanks a lot


View 3 Replies View Related

SqlBulkCopy Instance Via SQLEXPRESS-ADO.NET 2.0-Visual C# Express: Security Was Unhandled?

Aug 28, 2007

Hi all,

I copied the following set of C# code statement from a website to learn the SqlBulkCopy instance via SQLEXPRESS-ADO.NET 2.0-Visual C# Express:

/////////////////////----Main.cs---//////////////////////

sing System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Text;

using System.Windows.Forms;

using System.Data.SqlClient;

namespace SqlBulkCopySample

{

public partial class frmMain : Form

{

public frmMain()

{

InitializeComponent();

}

private void btnStart_Click(object sender, EventArgs e)

{

String sourceConnectionString =

"Data Source=.SQLEXPRESS;Initial Catalog=Northwind;Integrated Security=True";

String destinationConnectionString =

"Data Source=.SQLEXPRESS;Initial Catalog=SqlBulkCopySample;Integrated Security=True";



DataTable data = SelectDataFromSource(sourceConnectionString);

CopyDataToDestination(destinationConnectionString, data);

}

private DataTable SelectDataFromSource(String connectionString)

{

DataTable data = new DataTable();

using (SqlConnection connection = new SqlConnection(connectionString))

{

SqlCommand command = new SqlCommand("SelectOrders", connection);

command.CommandType = CommandType.StoredProcedure;

connection.Open();

SqlDataReader reader = command.ExecuteReader();

data.Load(reader);

}

return data;

}

private void CopyDataToDestination(String connectionString, DataTable table)

{

SqlBulkCopyColumnMapping mapping1 =

new SqlBulkCopyColumnMapping("OrderID", "ID");

SqlBulkCopyColumnMapping mapping2 =

new SqlBulkCopyColumnMapping("ShipName", "Name");

SqlBulkCopyColumnMapping mapping3 =

new SqlBulkCopyColumnMapping("ShipAddress", "Address");

SqlBulkCopyColumnMapping mapping4 =

new SqlBulkCopyColumnMapping("ShipCity", "City");

SqlBulkCopy bulkCopy = new SqlBulkCopy(connectionString);

bulkCopy.BatchSize = 100;

bulkCopy.BulkCopyTimeout = 5;

bulkCopy.ColumnMappings.Add(mapping1);

bulkCopy.ColumnMappings.Add(mapping2);

bulkCopy.ColumnMappings.Add(mapping3);

bulkCopy.ColumnMappings.Add(mapping4);

bulkCopy.DestinationTableName = "DataMySqlBC1";

bulkCopy.SqlRowsCopied +=

new SqlRowsCopiedEventHandler(bulkCopy_SqlRowsCopied);

bulkCopy.NotifyAfter = 200;

bulkCopy.WriteToServer(table);

}

void bulkCopy_SqlRowsCopied(object sender, SqlRowsCopiedEventArgs e)

{

MessageBox.Show

(String.Format("{0} Rows have been copied.", e.RowsCopied.ToString()));

}

}

}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////
I executed the above project in my local PC (with Adiministrator previlidge/use) that is in our LAN/Network system and I got an error: SecurityException was unhandled - Request for permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'failed. First, I have a question: is this problem related to the remote connection to SQLEXPRESS? Second, I do not know how to solve this problem. Please help and answer my first question and tell me how to solve this problem.

Thanks in advance,
Scott Chang

View 1 Replies View Related

Embedded SQL Server Express Deployment - Unhandled Exception: Database Already Exists

Mar 7, 2007

Good Afternoon.

I am trying to write a short application within which I would like to embed a SQL Server Express database, all of which would be deployed via ClickOnce through a web site. The installation process seems to be working without trouble, including installation of the .NET Framework 2.0 and SQL Server Express 2005.

When the application launches on the new machine, however, I get a big Microsoft .NET Framework "Unhandled exception" error dialog box that indicates the database already exists and that the database file could not be attached. I am working with a clean virtual machine that I know has never had the database installed on it.

I fear I am overlooking something quite straightforward, but since this is the first time I have ever attempted to build a data-bound application, I am not sure where I am going wrong.

Perhaps the source of the problem, or a related problem, might be revealed even when I run the application in debug mode from within Visual Studio. I can run the application once, but if I try to run it again, I get an error when I try to open the database connection that is similar in content (database already exists...could not attach). I can run the SSEUtil and detach the database and then run the application again in debug mode and it works no problem (the first time!).

Lastly, if I install the application on the machine on which it was developed and make sure the database is detached, it will run without any trouble (even repeatedly). But, on a new blank machine, there is no database listed that matches my database name, so I cannot try to detach anything!?

My apologies for such a novice question!

Sean

View 3 Replies View Related

SQL 2005 : Provider: Named Pipes Provider, Error: 40 - Could Not Open A Connection To SQL Server

Mar 17, 2008

Hi to all,


We have 4 client machine and 1 server machine, that server have all the sql server 2005 database€™s.


A project developed from client1 with Asp.net 2005 now I need to access that project from client2 so I type http://My Ip address/Folder Name/home.aspx in my browser here when the sql connection is open(SqlConnection.Opn()) then I meet this problem


An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)


Please reply me.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved