RAISEERROR Not Throwing Exception In .NET

Jul 9, 2007

I am calling a stored procedure that looks like this.


Code:


ALTER PROCEDURE [dbo].[VerifyLogin]
-- Add the parameters for the stored procedure here
@Email nvarchar (100),
@Password nvarchar (200)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;

DECLARE @Count int
DECLARE @Accounts int

SET @Accounts = (Select Count(*) from Users Where UPPER(Email) = UPPER(@Email))

IF @Accounts = 0
BEGIN
RAISERROR('E-mail address not found.', 10, 1)
END
ELSE
BEGIN
SET @Count = (Select Count(*) from Users Where UPPER(Email) = UPPER(@Email) and Password = @Password)

IF @Count > 0
select 1 as Verification
ELSE
select 0 as Verification
END
END



When I enter a login that does not exist, the error is not thrown in .net. Tracing the code shows normal execution. What am I doing wrong?

View 1 Replies


ADVERTISEMENT

Raiseerror Does Not Raise Exception

Aug 16, 2006

Hi friends



i've a stored proc (sql 2005) that'll raiseerror statement when something violated.



but my C# application that calls this stored proc does not any throw exception when this happens !!



i remember visual basic used to through an exception for this type of things.



is it different in C# and how do we handle this scenario ?



Thanks for ur ideas.

View 10 Replies View Related

' Question Throwing Exception

Aug 24, 2006

I have a comboBox with some names binded to it....With in the names some of them are like--- Store's Store, and like Danny's Gym...when i select names with ' in them i get this exception

Incorrect Syntax near 'S' Unclosed Question mark before the charectar string ORDER BY "SomeValue".....how could i go about fixing this?????

 

should i include some king of function that pulls out those quotes??? or what??? any help with this issue

 

 

View 3 Replies View Related

CASE Statement Throwing Exception

Feb 26, 2008

I am using Compact Edition 3.5 against the Northwind.sdf database. The following SQL statement throws an error window in Visual Studio 2008 that states "The parameter is incorrect.". This only occurs when I have an input parameter inside the CASE statement.

**********************************************************************************************************
PLEASE DO NOT TELL ME I CAN JUST USE 'WHERE @CompanyName LIKE '%ABB%''
BECAUSE I UNDERSTAND THAT - I WANT TO KNOW WHY THE SYNTAX I HAVE IS
THROWING AN EXCEPTION
**********************************************************************************************************


This throws an exception when input parameter is in the CASE statement:
SELECT [Customer ID]
FROM Customers
WHERE (CASE WHEN @CompanyName LIKE '%ABB%' THEN 1 ELSE 0 END = 1)


This DOES NOT throw an exception (I know they do not get me the same results):

SELECT [Customer ID]
FROM Customers
WHERE (CASE WHEN [Company Name] LIKE '%ABB%' THEN 1 ELSE 0 END = 1)


TIA!

View 6 Replies View Related

Custom Report Renderer Throwing An Exception

Jan 31, 2008

I have to create a custom rendering extension for SQL Server 2005 Reporting Services.

I followed the instructions in the MSDN article: http://msdn.microsoft.com/msdnmag/issues/05/02/CustomRenderers/default.aspx

I am running the report server under an administrative account provileges on the local machine (XP Pro SP2).
The Reporting Services is installed for SQL Server 2005 Trial/Evaluation Edition (not expired yet) and has been upgraded to Service Pack 2.
The Report Manager runs under a default ASPNET account.

After deploying the extension according to instructions in the article, I see the custom renderer in the list of available rendering formats in the dropdown in the Report Manager.

However, when I select that renderer and click "Export", a new IE window opens with the following error message:


Server Error in '/Reports$SQLSERVER2005DEV' Application.


That assembly does not allow partially trusted callers.
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.Exception: That assembly does not allow partially trusted callers.

Source Error:





An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:





[Exception: That assembly does not allow partially trusted callers.]

[Exception: An error occurred during rendering of the report.]

[Exception: An unexpected error occurred in Report Processing.]
Microsoft.Reporting.WebForms.ServerReport.ServerUrlRequest(Boolean isAbortable, String url, Stream outputStream, String& mimeType, String& fileNameExtension) +503
Microsoft.Reporting.WebForms.ServerReport.InternalRender(Boolean isAbortable, String format, String deviceInfo, NameValueCollection urlAccessParameters, Stream reportStream, String& mimeType, String& fileNameExtension) +958
Microsoft.Reporting.WebForms.ServerReportControlSource.RenderReport(String format, String deviceInfo, NameValueCollection additionalParams, String& mimeType, String& fileExtension) +84
Microsoft.Reporting.WebForms.ExportOperation.PerformOperation(NameValueCollection urlQuery, HttpResponse response) +143
Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context) +153
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +358
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64




Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433


My "why is it not working" question basically breaks down to 3 questions:

1. Why does this error say "partially trusted" whereas the new element in the rssrvpolicy.config file explicitly asks for "FullTrust" permissions?

2. Is there any deployment step that I'm missing?
[For now, it's:
- copy-and-paste the dll into ReportServerin directory;
- add a new CodeGroup element to the rssrvpolicy.config file;
- add a new Extension element to the rsreportserver.config file;
- IIS reset;
- Reporting Services service restart.]

3. Also, I checked the deployment instructions in BOL (Deploying Rendering Extension: http://msdn2.microsoft.com/en-us/library/ms154516.aspx), just to make sure I didn't miss anything.
An interesting this is, the BOL article does NOT mention a requirement for adding a new element into rssrvpolicy.config file.
Is this an error in the September 2007 Books Online?


The same error (regarding "partically trusted" - see above) occurs even after I signed the assembly with a strong name key (although this is not mentioned in the articles, but I figured it might be necessary).

Could someone point me in the right direction as to how to properly deploy a custom rendering extension, please?

Thanks a lot!

View 3 Replies View Related

Subreport Throwing An Exception When Placed In A Group Footer

Jul 24, 2006

I ran into this a few weeks ago and found that several others had as well, but no one had yet found an answer. I found the answer (at least one of the answers) this weekend and wanted to share it. I had recently added a subreport to a group footer in a table and started getting an error. Depending on the data, the error wasn't always present. I didn't have a problem when I moved the subreport to any other area in the report.

Here is the error I was getting:

An error occurred during local report processing

An internal error occurred on the report server. See the error log for more details.

It was a local report (rdlc), so naturally, there was no error log <g>. I added an event handler for ReportError and collected this information:

7/23/2006 5:18:22 PM
OS: Microsoft Windows NT 5.1.2600 Service Pack 2

*** EXCEPTION ***
Message: Exception has been thrown by the target of an invocation.
Source: mscorlib
Stack Trace: at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.UserControl.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.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at SX.MainProgram.Main() in C:Documents and SettingsMYeagerMy DocumentsVisual Studio 2005ProjectsSXSXMainProgram.cs:line 22


*** INNER EXCEPTION ***
Message: Reporting Service Exception
Source: SX
Stack Trace: at SX.ReportSalesForm.reportViewer1_ReportError(Object sender, ReportErrorEventArgs e) in C:Documents and SettingsMYeagerMy DocumentsVisual Studio 2005ProjectsSXSXReportFormsReportSalesForm.cs:line 84
at Microsoft.Reporting.WinForms.ReportViewer.OnError(Exception e)
at Microsoft.Reporting.WinForms.ReportViewer.UpdateUIState(Exception e)
at Microsoft.Reporting.WinForms.ReportViewer.OnRenderingCompleteUI(ProcessThreadResult result, PostRenderArgs postRenderArgs)


*** INNER EXCEPTION ***
Message: An error occurred during local report processing.
Source: Microsoft.ReportViewer.WinForms
Stack Trace: at Microsoft.Reporting.WinForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, CreateAndRegisterStream createStreamCallback, Warning[]& warnings)
at Microsoft.Reporting.WinForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, String& mimeType, String& encoding, String& fileNameExtension, String[]& streams, Warning[]& warnings)
at Microsoft.Reporting.WinForms.ProcessingThread.ProcessThreadMain(Object arg)


*** INNER EXCEPTION ***
Message: An internal error occurred on the report server. See the error log for more details.
Source: Microsoft.ReportViewer.Common
Stack Trace: at Microsoft.ReportingServices.Diagnostics.Utilities.RSTraceInternal.Assert(Boolean condition, String componentName)
at Microsoft.ReportingServices.ReportProcessing.Persistence.IntermediateFormatWriter.WriteVariant(Object variant, Boolean convertDBNull)
at Microsoft.ReportingServices.ReportProcessing.Persistence.IntermediateFormatWriter.WriteScopeTableValues(Object value)
at Microsoft.ReportingServices.ReportProcessing.Persistence.IntermediateFormatWriter.WriteScopeTableValues(Object value)
at Microsoft.ReportingServices.ReportProcessing.Persistence.IntermediateFormatWriter.WriteScopeLookupTable(ScopeLookupTable scopeTable)
at Microsoft.ReportingServices.ReportProcessing.Persistence.IntermediateFormatWriter.WriteSubReport(SubReport subReport)
at Microsoft.ReportingServices.ReportProcessing.Persistence.IntermediateFormatWriter.WriteReportItem(ReportItem reportItem)
at Microsoft.ReportingServices.ReportProcessing.Persistence.IntermediateFormatWriter.WriteReportItemList(ReportItemList reportItems)
at Microsoft.ReportingServices.ReportProcessing.Persistence.IntermediateFormatWriter.WriteReportItemCollection(ReportItemCollection reportItems)
at Microsoft.ReportingServices.ReportProcessing.Persistence.IntermediateFormatWriter.WriteRectangle(Rectangle rectangle)
at Microsoft.ReportingServices.ReportProcessing.Persistence.IntermediateFormatWriter.WriteReportItem(ReportItem reportItem)
at Microsoft.ReportingServices.ReportProcessing.Persistence.IntermediateFormatWriter.WriteReportItemList(ReportItemList reportItems)
at Microsoft.ReportingServices.ReportProcessing.Persistence.IntermediateFormatWriter.WriteReportItemCollection(ReportItemCollection reportItems)
at Microsoft.ReportingServices.ReportProcessing.Persistence.IntermediateFormatWriter.WriteTableRow(TableRow tableRow)
at Microsoft.ReportingServices.ReportProcessing.Persistence.IntermediateFormatWriter.WriteTableRowList(TableRowList rows)
at Microsoft.ReportingServices.ReportProcessing.Persistence.IntermediateFormatWriter.WriteTableGroup(TableGroup tableGroup)
at Microsoft.ReportingServices.ReportProcessing.Persistence.IntermediateFormatWriter.WriteTable(Table table)
at Microsoft.ReportingServices.ReportProcessing.Persistence.IntermediateFormatWriter.WriteDataRegion(DataRegion dataRegion)
at Microsoft.ReportingServices.ReportProcessing.Persistence.IntermediateFormatWriter.WriteReportItem(ReportItem reportItem)
at Microsoft.ReportingServices.ReportProcessing.Persistence.IntermediateFormatWriter.WriteReportItemList(ReportItemList reportItems)
at Microsoft.ReportingServices.ReportProcessing.Persistence.IntermediateFormatWriter.WriteReportItemCollection(ReportItemCollection reportItems)
at Microsoft.ReportingServices.ReportProcessing.Persistence.IntermediateFormatWriter.WriteReport(Report report)
at Microsoft.ReportingServices.ReportProcessing.Persistence.IntermediateFormatWriter.WriteReportSnapshot(ReportSnapshot reportSnapshot)
at Microsoft.ReportingServices.ReportProcessing.ChunkManager.SnapshotChunkManager.SaveReportSnapshot(ReportSnapshot reportSnapshot)
at Microsoft.ReportingServices.ReportProcessing.ProcessingResult.Save()
at Microsoft.Reporting.LocalService.Render(PreviewItemContext itemContext, Boolean allowInternalRenderers, ParameterInfoCollection reportParameters, IEnumerable dataSources, DatasourceCredentialsCollection credentials, CreateAndRegisterStream createStreamCallback, ReportRuntimeSetup runtimeSetup, ProcessingMessageList& warnings)
at Microsoft.Reporting.WinForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, CreateAndRegisterStream createStreamCallback, Warning[]& warnings)


This wasn't exactly enlightening, an exception in an ASSERT in the reporting services dll, but since I knew that results varied with different data, I tracked it down that way.

THE SOLUTION:

The problem occurs when data for group expression is null. If there is no subreport in the group footer, this isn't an issue, but if there is, you get the error. For instance, if your data comes from a SQL statement with a LEFT OUTER JOIN (as mine did), and the group expression uses a column that contains nulls as a result of the LEFT OUTER, this exception will be thrown. This one was VERY DIFFICULT to track down, but it's easily reproducable. It has nothing to do with what (if anything is) on the subreport, what the data the subreport uses looks like, whether there are parameters or not. It's purely having nulls in the data used by the group expression for the main report. I found that if I changed my SELECT from mytable.mycolumn to ISNULL(mytable.mycolumn, 0) the error went away.

Mike Yeager

View 5 Replies View Related

Throwing Exception In Stored Proc To Catch In C# And Rollback The Transaction

Sep 27, 2007




Hi,

I am using sql2k5. I just wanted to throw an error from stored procedure with some message to C# to rollback my transaction.
Here is how i wnated to do ( in sequence )

C#
=====
Open a connection
Begin the transaction
Execute the command

In the Stored Proc
===========
do multiple operations one by one
if error
stop processing further
Throw the error
C#
========
if exception
rollback the transaction
else
commit the transaction

I have tried using raise error in stored proc but never thrown exception

Can any one let me know how to achieve this scenario??

~Mohan Babu

View 5 Replies View Related

Simple DB Operations Are Throwing Native Exception Error - 0xc0000005 - Intermittently

Dec 4, 2006

Hi All,

We have written a multithreaded application in which we are maintaining separate Database connections for each thread. these connections are opened and closed at the start and exit of the thread.

We have observed that even if there is only one thread running ( application thread), execution of simple Select queries some times throws Native exception(Error - 0xc0000005 ).

This error comes intermittently. Execution of same query doesn't throw exception.

Further investigation by breaking the debug at the time of native exception and then looking into the stack trace shows that native exception has occured at one of the Native API (CompileQueryPlan() ) which is being called implicitly by the SQL Mobile.

Each time when we see native exception stack trace shows failure at CompileQueryPlan() call.

Let me know if this is a known defect in SQL Mobile 2005 or there is something else that is causing native exception.

Thanks,

Nikhil











View 11 Replies View Related

Issue With Raiseerror

Apr 11, 2008

I have an issue with the error message that is being raised in a stored procedure:
RAISERROR('Error inserting Value %d into Order_Header_Reference_Code_XREF for Order_Header_ID %d and Reference_Code_ID %d', 10, 1, @Value, @OrderHeaderID, @ReferenceCodeID)
Here is the result after executing my procedure with "@Value = 'test'"
Error inserting Value 114994016 into Order_Header_Reference_Code_XREF for Order_Header_ID 10801 and Reference_Code_ID 1
 
114994016 should say 'test' right?
Does anyone see an issue with my raiseerror statement?

View 3 Replies View Related

'((System.Exception)($exception)).Message' Threw An Exception Of Type 'System.NotSupportedException'

Jan 16, 2008

Greetings everyone, I am attempting to build my first application using Microsofts Sql databases. It is a Windows Mobile application so I am using Sql Server Compact 3.5 with Visual Studio 2008 Beta 2. When I try and insert a new row into one of my tables, the app throws the error message shown in the title of this topic.
'((System.Exception)($exception)).Message' threw an exception of type 'System.NotSupportedException'



My table has 4 columns (i have since changed my FavoriteAccount datatype from bit to Integer)
http://i85.photobucket.com/albums/k71/Scionwest/table.jpg

Account type will either be "Checking" or "Savings" when a new row is added, the user will select what they want from a combo box.

Next is a snap shot of my startup form.
http://i85.photobucket.com/albums/k71/Scionwest/form.jpg



Where it says "Favorite Account: None" in the top panel, I am using a link label. When a user clicks "None" it will go to a account creation wizard, and set the first account as it's primary/favorite. As more accounts are added the user can select which will be his/her primary/favorite. For now I am just creating a sample account when the label is clicked in an attempt to get something working. Below is the code used.


private void lnkFavoriteAccount_Click(object sender, EventArgs e)

{

FinancesDataSet.BankAccountRow account = this.financesDataSet.BankAccount.NewBankAccountRow();

account.Name = "MyBank Checking Account";

account.AccountType = "Checking";

account.Balance = Convert.ToDecimal("15.03");

account.FavoriteAccount = 1;//datatype is an integer, I have changed it since I took the screenshot.

financesDataSet.BankAccount.Rows.Add(account);
//The next three lines where added while I was trying to get this to work.
//I don't know if I really need them or not, I receive the error regardless if these are here or not.



this.bankAccountTableAdapter1.Update(financesDataSet);

this.financesDataSet.AcceptChanges();

refreshDatabase();

}


the refreshDatabase() code is here:


private void refreshDatabase()

{

this.bankAccountTableAdapter1.Fill(this.financesDataSet.BankAccount);

//Aquire a count of accounts the user has

int numAccounts = financesDataSet.BankAccount.Count;

//Loop through each account and see which one is the primary.

for (int num = 0; num != numAccounts; num++)

{
//Works ok in frmMain_Load, but when my lnkFavoriteAccount_click calls this, it throws the error.

if (this.financesDataSet.BankAccount[num].FavoriteAccount == 1)

{
//Display the primary account on our home page. User can click the link label & be taken to their account register.

this.lnkFavoriteAccount.Text = this.financesDataSet.BankAccount[num].Name.ToString();

this.lnkFavoriteFunds.Text = this.financesDataSet.BankAccount[num].Balance.ToString();

break;

}

}

}


and my form_load code

private void frmMain_Load(object sender, EventArgs e)

{

refreshDatabase();

}


So, when I click on the lnkFavoriteAccount label, and my new row gets added, the app stops at the following line in my DataSet.Designer

[global:ystem.Diagnostics.DebuggerNonUserCodeAttribute()]

public byte FavoriteAccount {

get {

try {

return ((byte)(this[this.tableBankAccount.FavoriteAccountColumn]));

}

catch (global:ystem.InvalidCastException e) {
//Stops at the following line, this error was caused by 'if (this.financesDataSet.BankAccount[num].FavoriteAccount == 1)'

throw new global:ystem.Data.StrongTypingException("The value for column 'FavoriteAccount' in table 'BankAccount' is DBNull.", e);

}

}

set {

this[this.tableBankAccount.FavoriteAccountColumn] = value;

}

}


I have no idea what I am doing wrong, all of the code I used I retreived from Microsofts help documentation included with VS2008. I have tried used my TableAdapter.Insert() method and it still failed when it got to

if (this.financesDataSet.BankAccount[num].FavoriteAccount == 1)

in my refreshDatabase() method it still failed.

When I look, the data has been added into the database, it's just when I try to retreive it now, it bails on me. Am I retreiving the information wrong?

Thanks for any help you guys can offer.

Johnathon

View 1 Replies View Related

Check Constraint To RAISEERROR On 547 16 1

Mar 15, 2008



Hi, I need the T-SQL statement on how to raise a custom error message for a check contraint @au_id '[0-9][0-9][0-9]-[0-9][0-9][0-9][0-9][0-9][0-9]' when ever a client enters the wrong SSN format such as 575-444865. I used the t-sql statement below but does not work when running an insert on the authors table ; au_id column.

CREATE TRIGGER trg_datavalidate
ON authors
FOR INSERT
AS
DECLARE @au_id varchar(11)
DECLARE @err INT

SELECT @err = @@ERROR
from inserted
IF @err = 547
BEGIN
PRINT 'Au_id needs to be in the SSN format xxx-xx-xxxx!. Error Number:'
+ CAST(@err AS VARCHAR)
RAISERROR ('au_id must be in the format of xxx-xxxxxx where x is a number.', -- Message text.
16, -- Severity.
1 -- State.
);
ROLLBACK TRANSACTION
END

View 4 Replies View Related

RAISEERROR From CLR Stored Procedures

May 14, 2005

I'm writing:

View 7 Replies View Related

RaiseError Inside Stored Procedure

Aug 5, 2006

I want to execute some insert statements within a stored procedure and commit those changes regardless of any raiseerror that occurs later in the stored procedure. My difficulty is that I am forced to use raiseerror with severity 16 in order to send a message through the powerbuilder application interface (compiled vendor code). I have tried save points but can't get that to save my insert and still present an error to the user about something else that happens later.



here is an example

BEGIN procedure

Insert something and save it even if error is raised below

RaiseError('you made a mistake and need to do this.',16,-1)

END procedure



View 5 Replies View Related

Is It Possible To Put The Raiseerror In A Text File Or Show It To The User After Its Been Inserted.

Oct 29, 2007

I am in process of building a website where the user can upload files and then those files are loaded in to a sql server database. I am using some sprocs to scrub the data and then insert them into the production database.. And in my sprpc before and after updating or inserting a record or scrubing... i am returning the count by raising an error. or returning the rownumber where the error occured.. is there any way  i can get the raise error part or whatever error i get while scrubing the data and relay it back to the user in a user freindly way or in a text file... or the best thing is can i open smalll window where i can show them what processing is goin on and alert them if there are any errors...
 Any help will be appreciated.
Regards
Karen 
  

View 5 Replies View Related

The Script Threw An Exception: Exception Of Type 'System.OutOfMemoryException' Was Thrown.

Jan 31, 2007

Hi,

I got an strange problem with one of my packages.

When running the package in VisualStudio it runs properly, but if I let this package run as part of an SQL-Server Agent job, I got the message "The script threw an exception: Exception of type 'System.OutOfMemoryException' was thrown." on my log and the package ends up with an error.

Both times it is exactly the same package on the same server, so I don't know how the debug or even if there is anything I need to debug?

Regards,

Jan

View 2 Replies View Related

This Is Throwing Me For A Loop...

Feb 22, 2006

I am trying to return a record from my sqlDataReader in 2.0. 
Here is the code that is throwing me:
Dim strSQL As String = "SELECT login FROM (Table) WHERE (username = 'something')"
Dim sqlDataReader As SqlDataReader
Dim ConnStr As String = "connectionString"
Dim myCn As New SqlClient.SqlConnection(ConnStr)
Dim myCmd As New SqlClient.SqlCommand(strSQL, myCn)
myCn.Open()
sqlDataReader = myCmd.ExecuteReader(CommandBehavior.CloseConnection)
The error that I'm gettin is this:  'Incorrect syntax near ')'.'  and its on my ExecuteReader line.  This works for me in 1.1 but not 2.0.  Any ideas as to why?
J
 

View 6 Replies View Related

Find Out Which Values Are Throwing A Constraint

Apr 11, 2008

I am trying to merge records with a stored procedure and I am getting a constraint violation error. Just wondering is there a way of finding out which records are the actual culprit?

This would help greatly in being able to troubleshoot this issue.

The error is this:

2/21/2008 12:40:39 PM :: Violation of UNIQUE KEY constraint 'SK_SomeConstraint'. Cannot insert duplicate key in object 'tblTable'.
The statement has been terminated.

The constraint is a group of clustered indexes that must be unique:

GO
/****** Object: Index [SK_SomeConstraint] Script Date: 04/11/2008 14:56:17 ******/
ALTER TABLE [dbo].[tblTable] ADD CONSTRAINT [SK_SomeConstraints] UNIQUE NONCLUSTERED
(
[IDa] ASC,
[IDb] ASC,
[IDc] ASC,
[someField] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

View 4 Replies View Related

Sql Agent Throwing Config Error I'm Not Using

Feb 20, 2008

OK so I have this SSIS package that uses a connection call "Conn1". I added this to my configuration file (which also contains connections called "Conn2" and "Conn3" which are used by other packages. Works fine in DEV when run via SQL Agent. I moved SSIS package and config file to prod server. SQL Agent now throws error on this package saying it cannot resolve path to "Conn3". This package doesn't use "Conn3"... I opened both the SSIS package and the Config file in notepad and verified Conn3 wasn't referenced in the package... HELP !!!!

View 3 Replies View Related

Analysis :: MDX-Query Throwing Error

Nov 18, 2015

I am new to SSAS and learning mdx, I am running the following query but it is throwing error "Parser: The syntax for 1 is incorrect",

Select [Measures].[Order Quantity] on axis(0),
[DimProduct].[Product By Category].[ProductCategory].members on axis(1)
From [ResellerSales]
where
Except({[DimProduct].[Product By Category].[ProductCategory].members},
{[DimProduct].[Product By Category].[ProductCategory].&[1]})

View 6 Replies View Related

ASP.Net, SQL, Using Datetime Objects As Variables (keeps Throwing Error)

Feb 20, 2008

Sorry seem to be havign no end of trouble with SQL today. I need to create a query that will rank tickets using the row count of another table which has a relationship with the primarykey of that ticket table. I decided to spilt it into two querys, one which gets the count each ticketid has within a date peroid and relating to a os:: SELECT     COUNT(*) AS count, Tickets.TicketID, Systems.OSFROM         Rating INNER JOIN                      Tickets ON Rating.TicketID = Tickets.TicketID INNER JOIN                      Systems ON Tickets.SystemID = Systems.SystemIDWHERE     (Rating.DateVoted >= @date)GROUP BY Tickets.TicketID, Systems.OSHAVING      (Systems.OS = @osid) This works, BUT when I put in the date using: command.CommandText = "SELECT COUNT(*) AS count, Tickets.TicketID, Systems.OS FROM Rating INNER JOIN Tickets ON Rating.TicketID = Tickets.TicketID INNER JOIN Systems ON Tickets.SystemID = Systems.SystemID WHERE (Rating.DateVoted >=" + Datetime.Now.Adddays(-7) + ") GROUP BY Tickets.TicketID, Systems.OS HAVING (Systems.OS =" + 1 + ")"; And it throws up an error saying there was a syntax error at '22' (the hour I am currently on). So: Any idea how I can fix thisAny ideas on creating a query that will do the above, but also return the ticket informationHow do you link querys (I might have to do this if I can't work out 2)Please, If anyone has any ideas. This is driving me crazy 

View 5 Replies View Related

Typed Dataset Schema Throwing Error

Apr 8, 2006

Hello,I'm using a typed dataset to access my database (SQL Express); I have a table that returns data, which two fields are null; I'm getting this error:{"Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints."}There are no foreign-key or unique key constraints, so it has to be a non-null issue; I changed the two fields in the table to have a null value of Empty instead of Throw Exception, but I don't understand what the problem is coming from...  I'm at a loss.Thanks.

View 2 Replies View Related

Ole Db Source Editor Preview Throwing An Error

Sep 2, 2006

i have a data flow configured to use a ole db source.  the ole db source uses an ole db connection manager pointing to the adventureworks db which suceeded when i tested its connection.  the data access mode of the ole db source is "sql command".  below is the sql command text:

SELECT SpecialOfferID, Description
DiscountPct, Type, Category, StartDate,
EndDate, MinQty, MaxQty, ModifiedDate
FROM Sales.SpecialOffer
WHERE ModifiedDate >= ? AND ModifiedDate < ?

this query uses 2 paramaters, each of which is mapped to a datetime variable which falls with the range of the ModifiedDate column as follows:

Parameter0: User::ExtractStartDate

Parameter1: User::ExtractStopDate

ExtractStartDate is set to 7/1/2001 and ExtractStopDate is set to 3/31/2004.  however, i get the following error when i press the preview button in the ole db source editor: "there was an error displaying the preview. additional information: no value given for one or more required parameters (microsoft sql native client)".

as far as i can tell, i have the ole db source configured correctly.  thus, i can't figure out why this error is being generated.  has anyone else experienced this issue?  if so, were you able to resolve it? is this a bug?

thanks in advance.

 

View 5 Replies View Related

SQL 2012 :: Log Reader Process Throwing Access Violation

Jul 15, 2015

Our log reader process is throwing an access violation error every 10 minutes or so. It runs fine for a bit then fails. Below is, I think, the important info from a stack dump analysis. We are running SQL 2012 SP1 64 bit. I think we can either install SP2 or open a case with Microsoft.

0:000> kC 1000
Call Site
sqlmin!ReplArticleCmd::updated_column
sqlmin!ReplArticleCmd::AddSupdateParams
sqlmin!ReplArticleCmd::GenerateSUpdateProcedure
sqlmin!ResolveUpdateCommand
sqlmin!ReplTranInfo::ProcessInsert
[Code] ....

I can see that the sp_replcmds SP is running when this happens.

* BEGIN STACK DUMP:
* 07/15/15 12:37:39 spid 81
*
*
* Exception Address = 000007F988FCA480 Module(sqlmin+0000000000C4A480)
* Exception Code = c0000005 EXCEPTION_ACCESS_VIOLATION
* Access Violation occurred reading address 0000000000000000

[Code] ....

View 0 Replies View Related

Merge Replication Throwing Very Weird Error Messages

Mar 2, 2007

I've been setting up subscriptions to a merge publication for the past 3 days. All of a sudden, I'm getting a pile of very strange errors. Replication is configured. I have 16 subscribers to an existing publication configured and synchronizing changes without any issues. The script that I'm using to create all of the subscriptions is as follows:

use [PIC]

exec sp_addmergesubscription @publication = N'PIC', @subscriber = N'machinenameSQLEXPRESS',

@subscriber_db = N'MyDatabase', @subscription_type = N'Push', @sync_type = N'Automatic',

@subscriber_type = N'Global', @subscription_priority = 75, @description = N'', @use_interactive_resolver = N'False'

exec sp_addmergepushsubscription_agent @publication = N'PIC', @subscriber = N'machinenameSQLEXPRESS',

@subscriber_db = N'MyDatabase', @job_login = null, @job_password = null, @subscriber_security_mode = 1,

@publisher_security_mode = 1, @frequency_type = 64, @frequency_interval = 0, @frequency_relative_interval = 0,

@frequency_recurrence_factor = 0, @frequency_subday = 0, @frequency_subday_interval = 0, @active_start_time_of_day = 0,

@active_end_time_of_day = 235959, @active_start_date = 0, @active_end_date = 0

GO

The last one that I added #17, gives the following errors after successfully creating the subscription.

Command attempted:


{call sys.sp_MSmergesubscribedb ('true', 0) }

Error messages:


The merge process could not initialize the subscription. Ensure that the subscription registration exists at the publisher, and reregister the subscription if necessary. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147201011)
Get help: http://help/MSSQL_REPL-2147201011

RegCreateKeyEx() returned error 5, 'Access is denied.' (Source: MSSQLServer, Error number: 22002)
Get help: http://help/22002

Could not add article resolver 'Microsoft SQL Server Additive Conflict Resolver' information to the registry (Source: MSSQLServer, Error number: 21713)
Get help: http://help/21713

Could not register article resolver: 'Microsoft SQL Server Additive Conflict Resolver'. (Source: MSSQLServer, Error number: 21715)
Get help: http://help/21715

The system tables for merge replication could not be created successfully. (Source: MSSQLServer, Error number: 20008)
Get help: http://help/20008

I've tried to manually create it using the GUI and get an even stranger error message as follows:

TITLE: New Subscription Wizard
------------------------------

Microsoft SQL Server Management Studio is unable to access replication components because replication is not installed on this instance of SQL Server. For information about installing replication, see the topic Installing Replication in SQL Server Books Online.

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.06&EvtSrc=Microsoft.SqlServer.Management.UI.ReplUtilitiesErrorSR&EvtID=ReplicationNotInstalled&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

Replication components are not installed on this server. Run SQL Server Setup again and select the option to install replication. (Microsoft SQL Server, Error: 21028)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=21028&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------


I very obviously have replication installed by virtue of the fact that I have a publication and 16 subscriptions that are currently synchronizing. Any ideas?

View 3 Replies View Related

SSIS Load From Server Throwing Non-specific Error

Apr 11, 2008

My BIDS installation is able to create new projects and open saved ones, but if i try to add an existing package from a remote server, it throws the error pasted below. I can see the package list, but once i choose the package, hit ok, then hit ok to load it, I get the error. I can open the same package on a different computer, so it's not user rights related. Below the error is version info. Thanks in advance for any help you might be able to give!

===================================
One or more error occurred. There should be more specific errors preceding this one that explains the details of the errors. This message is used as a return value from functions that encounter errors.
(Microsoft Visual Studio)
------------------------------
Program Location:
at Microsoft.SqlServer.Dts.Runtime.Application.LoadFromSqlServer(String packagePath, String serverName, String serverUserName, String serverPassword, IDTSEvents events)
at Microsoft.DataTransformationServices.Controls.PackageProtectionUtils.<>c__DisplayClassa.<LoadPackageFromSql>b__9(String password, IDTSEvents events)
at Microsoft.DataTransformationServices.Controls.PackageProtectionUtils.LoadPackageWithPassword(PackageLoader loader, IWin32Window dialogParent, String& packagePassword)
at Microsoft.DataTransformationServices.Controls.PackageProtectionUtils.LoadPackageFromSql(String packagePath, String server, String sqlUserName, String sqlServerPassword, IWin32Window dialogParent, String& packagePassword)
at Microsoft.DataTransformationServices.Controls.PackageLocationControl.LoadPackage(String& packagePassword)
at Microsoft.DataTransformationServices.Project.Controls.AddExistingPackageForm.AddExistingPackage()
at Microsoft.DataTransformationServices.Project.Controls.AddExistingPackageForm.AddExistingPackageForm_FormClosing(Object sender, FormClosingEventArgs e)
===================================
One or more error occurred. There should be more specific errors preceding this one that explains the details of the errors. This message is used as a return value from functions that encounter errors.

------------------------------
Program Location:
at Microsoft.SqlServer.Dts.Runtime.Wrapper.ApplicationClass.LoadFromSQLServer(String bstrPackagePath, String bstrServerName, String bstrServerUserName, String bstrServerPassword, Boolean bLoadNeutral, IDTSEvents90 pEvents)
at Microsoft.SqlServer.Dts.Runtime.Application.LoadFromSqlServer(String packagePath, String serverName, String serverUserName, String serverPassword, IDTSEvents events)




Microsoft Visual Studio 2005
Version 8.0.50727.42 (RTM.050727-4200)
Microsoft .NET Framework
Version 2.0.50727

Installed Edition: IDE Standard
Microsoft Visual Studio 2005 Tools for Applications

SQL Server Analysis Services
Microsoft SQL Server Analysis Services Designer
Version 9.00.3042.00

SQL Server Integration Services
Microsoft SQL Server Integration Services Designer
Version 9.00.3042.00

SQL Server Reporting Services
Microsoft SQL Server Reporting Services Designers
Version 9.00.3042.00

View 1 Replies View Related

Integration Services :: SSIS 2012 Script Always Throwing Same Error

Nov 14, 2013

I am writing the following code in my SSIS 2012 script task.I am deliberately trying to fali this code by adding some typos in the connection string.I want to catch the exception and display the exact exception message.but SSIS runtime is always throwing same error message as follows:

Exception has been thrown by the target of an invocation.

at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript()

Below is the code
  
public void Main()
  {
    //TODO: Add your code here
            try
            {
                SqlConnection conn = new SqlConnection("Data Source=apsed1674;Integrated Security=true;database=EDX");
             
[Code] ....

View 9 Replies View Related

Throwing Error When Querying The Image Of Database In SQL Server 2000.

Oct 3, 2007



I created an Image for the Database in sqlserver 2000. When I am querying directly the database as "Select * from employee", it is returning the result set.

But, when I am querying Database image with same query. It is giving error

Server: Msg 208, Level 16, State 1, Line 1
Invalid object name 'Employee'

It is expecting the Database Owner. If I do query like "Select * from [Owner].employee", it is working fine.

My requirement is not use owner in queries, it should be simple query ("Select * from employee").


Can any one, help me out.
Thanks in advance.
Bhupesh

View 1 Replies View Related

Custom Data Flow Task Throwing Error When Run From Command Prompt

Jan 17, 2007



Hi,

I developed a custom data flow task in .net 2.0 using Visual Studio 2005. I installed it into GAC using GACUTIL and also copied it into the pipeline directory. This task runs absolutely fine when I run it on my local machine both in BIDS and using the script in windows 2000 environment. However, when I deployed this package into a windows 2003 server, the package fails at the custom task level. I checked the GAC in windowsassembly directory and it is present. Also I copied the file into the PipeLine directory and verified that I copied it into the correct pipeline directory by checking the registry. The version of the assembly is still Debug. I looked up documentation in MSDN but there is very little information about the errors I am seeing.

The error I get is pasted below, Can somebody please help me as I am currently stuck and running out of ideas to fix this problem.

Code: 0xC0047067

Source: DFT Raw File DFT Raw File (DTS.Pipeline)

Description: The "component "_" (2546)" failed to cache the component metadata object and returned error code 0x80131600.

Code: 0xC004706C

Source: DFT Raw File DFT Raw File (DTS.Pipeline)

Description: Component "component "_" (2546)" could not be created and returned error code 0xC0047067. Make sure that the component is registered correctly.

View 6 Replies View Related

Delete SQL Script As400 Throwing Object Reference Not Set To An Instance Of An Object

Apr 2, 2008

I am trying to send some data back to our as/400 from SQL server. Before I do so I need to delete entries from the table. I have an odbc connection set up and have used it sucessfully in a datareader compoenent but but when I try to use it for a delete SQL task it give me the followign error. what am I doing wrong? I even tried hardcoding in the system name/library name.

Here is my delete sql script
DELETE FROM DSSCNTL Where Companycode = 10


TITLE: SQL Task
------------------------------
Object reference not set to an instance of an object.
------------------------------
BUTTONS:
OK
------------------------------

View 7 Replies View Related

Sql Exception

Jun 29, 2006

Guys, I need your help on this one. I have a problem here. There is an exception on my conn.Open.
It said that "SQL Exception was unhandled by user code. Cannot open database requested in login 'MUSIC STORE'. Login fails.Login failed for user 'IT785P13student'."
Does anyone have any idea what this means?
 
 

View 2 Replies View Related

Sql Exception

Nov 19, 2006

I downloaded a web site from internet and tried to open it in visual web developer express edition but it gave an error and the code and the error was:
      CODE- Return CType(Me.GetPropertyValue("Theme"),String)
     ERROR -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.
 An answer will be very good for me

View 1 Replies View Related

Sql Exception

May 25, 2007

 Hi -  I am new to *** forum and could really use some help. I am trying to insert the following values in an sql server 2003 database and I get an exception labeled:System.Data.SqlClient.SqlException: Incorrect syntax near ')'. Source:Line 91: connection.Open();Line 92: int numRowsAffected;Line 93: numRowsAffected= command.ExecuteNonQuery();Line 94: connection.Close();Line 95: Stack Trace:[SqlException (0x80131904): Incorrect syntax near ')'.] System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +95 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +82 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +346 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +3244 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +186 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +1121 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +334 System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +407 System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +149 _Default.Button1_Click(Object sender, EventArgs e) in e:Hampton DirectWebsitesLunchOrderRestaurantEditor.aspx.cs:93 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +96 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +116 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +31 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +32 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +72 Source Code: SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["LunchOrderTestDBConnectionString1"].ToString());SqlCommand command = new SqlCommand("INSERT INTO Restaurants (Name,Address1,Phone,Fax,Menu_Pages,) VALUES ( @Name,@Address1,@Phone,@Fax,@Menu_Pages)", connection); //@MenuSqlParameter param0 = new SqlParameter( "@Name", SqlDbType.VarChar,50 );param0.Value = TextBox1.Text;command.Parameters.Add( param0 );SqlParameter param1 = new SqlParameter("@Address1", SqlDbType.VarChar, 50);param1.Value = TextBox2.Text;command.Parameters.Add(param1);SqlParameter param2 = new SqlParameter("@Phone", SqlDbType.VarChar, 50);param2.Value = TextBox3.Text;command.Parameters.Add( param2 );SqlParameter param3 = new SqlParameter("@Fax", SqlDbType.VarChar, 50);param3.Value = TextBox5.Text;command.Parameters.Add(param3);//SqlParameter param4 = new SqlParameter("@Menu", SqlDbType.Image);//param4.Value = byte_data;//command.Parameters.Add(param4);SqlParameter param5 = new SqlParameter("@Menu_Pages", SqlDbType.Int, 50);param5.Value = Int32.Parse(TextBox6.Text);command.Parameters.Add(param5);connection.Open();int numRowsAffected;numRowsAffected= command.ExecuteNonQuery();connection.Close();Thank You in advance for all help and suggestions!   

View 1 Replies View Related

SQL Exception

Jul 23, 2007

I am trying to insert data into a table and I am getting a SQL Exception: System.Data.SqlClient.SqlException {"Incorrect syntax near 'nvarchar'. Must declare the scalar variable "@"."} 
This is my subroutine that is executed once the submit button is clicked.
Please advise. Thank you for your time!
 1 Protected Sub SubmitButton_Click(ByVal sender As Object, ByVal e As System.EventArgs)
2 Dim CMLdataSource As New SqlDataSource()
3 Dim commStr As String
4
5 CMLdataSource.ConnectionString = ConfigurationManager.ConnectionStrings("CMLConnectionString1").ToString()
6
7 CMLdataSource.InsertCommandType = SqlDataSourceCommandType.Text
8 commStr = "INSERT INTO SCOs (ProjCode, SCONum, SCORev, DateIssued, DateAssigned, ProjName, CSCI, Description, [IDENT NUMBER], REV, PPRChgAbstract, SourceCodeChange, DocumentChange, "
9 commStr = commStr & "DocChangeRev, ChangeNoticeNum, TechInvest, CDMRep, TestEngineer, SQE, SCCBChair, CDMLibrarian, ECPNum, [CLASS 1], [CLASS 2]) "
10 commStr = commStr & "VALUES (@ProjCode, @SCONum, @SCORev, @DateIssued, @DateAssigned, @ProjName, @CSCI, @Description, @[IDENT NUMBER], @REV, @PPRChgAbstract, @SourceCodeChange, @DocumentChange, "
11 commStr = commStr & "@DocChangeRev, @ChangeNoticeNum, @TechInvest, @CDMRep, @TestEngineer, @SQE, @SCCBChair, @CDMLibrarian, @ECPNum, @[CLASS 1], @[CLASS 2])"
12
13 CMLdataSource.InsertCommand = commStr
14
15 CMLdataSource.InsertParameters.Add("ProjCode", CodeList.Text)
16 CMLdataSource.InsertParameters.Add("SCONum", scoNum.Text)
17 CMLdataSource.InsertParameters.Add("SCORev", ScoRevTextBox.Text)
18 CMLdataSource.InsertParameters.Add("DateIssued", DateIssuedTextBox.Text)
19 CMLdataSource.InsertParameters.Add("DateAssigned", DateAssigTextBox.Text)
20 CMLdataSource.InsertParameters.Add("ProjName", ProjectList.Text)
21 CMLdataSource.InsertParameters.Add("CSCI", CsciTextBox.Text)
22 CMLdataSource.InsertParameters.Add("Description", MediaTextBox.Text)
23 CMLdataSource.InsertParameters.Add("[IDENT NUMBER]", IDTextBox.Text)
24 CMLdataSource.InsertParameters.Add("REV", RevTextBox.Text)
25 CMLdataSource.InsertParameters.Add("PPRChgAbstract", PPRTextBox.Text)
26 CMLdataSource.InsertParameters.Add("SourceCodeChange", SourceCodeTextBox.Text)
27 CMLdataSource.InsertParameters.Add("DocumentChange", DocTitleTextBox.Text)
28 CMLdataSource.InsertParameters.Add("DocChangeRev", RevLetterTextBox.Text)
29 CMLdataSource.InsertParameters.Add("ChangeNoticeNum", ChangeNoticeTextBox.Text)
30 CMLdataSource.InsertParameters.Add("TechInvest", TechInvestTextBox.Text)
31 CMLdataSource.InsertParameters.Add("CDMRep", SwCdmTextBox.Text)
32 CMLdataSource.InsertParameters.Add("TestEngineer", TestEngTextBox.Text)
33 CMLdataSource.InsertParameters.Add("SQE", SqeTextBox.Text)
34 CMLdataSource.InsertParameters.Add("SCCBChair", SccbChairTextBox.Text)
35 CMLdataSource.InsertParameters.Add("CDMLibrarian", CdmLibTextBox.Text)
36 CMLdataSource.InsertParameters.Add("ECPNum", EcpNumTextBox.Text)
37 CMLdataSource.InsertParameters.Add("[Class 1]", Class1TextBox.Text)
38 CMLdataSource.InsertParameters.Add("[Class 2]", Class2TextBox.Text)
39
40 Dim RowsAffected As Integer = 0
41
42 Try
43 RowsAffected = CMLdataSource.Insert()
44 Catch ex As Exception
45 CMLdataSource = Nothing
46 Server.Transfer("dberror.aspx")
47 Finally
48 CMLdataSource = Nothing
49 End Try
50
51
52 If RowsAffected <> 1 Then
53
54 Server.Transfer("dbError.aspx")
55
56 Else
57 Server.Transfer("newConfirm.aspx")
58
59 End If
60
61
62 End Sub
 

View 16 Replies View Related







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