Allowing An Exception To A Trigger

Nov 25, 2006

I created an UPDATE trigger on a table - but there one case where I would not the trigger to occur.  I mean, in one procedure it may update this table and I would not the trigger to occur a update occurred because of this stored procedure.  I could alter my trigger but I am not sure if I would be able to tell which procedure caused it without adding a special column, but if I have to I will.

 

View 2 Replies


ADVERTISEMENT

Trigger Throws Exception Error In Great Plains 8.0

Sep 21, 2007

Not sure if there's a GP 8.0 forum, so giving this one a go.



I've added an AFTER UPDATE trigger to the RM00101 table (customer master) in a Great Plains 8.0 SQL Server 2000 SP4 DB. The trigger assigns field values to variables, constructs an update query, and executes the query on a table in a linked SQL Server 2005 DB.

The trigger works fine when fired as a result of a direct field update made through Enterprise Manager. However, when the same update is made through the Great Plains GIU (customer card window), an exception error is thrown:

"Unhandled database exception:
A Save operation on table €˜RM_Customer_MSTR€™ failed accessing SQL data

EXCEPTION_CLASS_DB
DB_ERR_SQL_DATA_ACCESS_ERR€?

The odd thing is that if I drop the trigger from the RM00101 table, the exception error still occurs. Not just on the record originally updated, but on all records and all fields within the record.

Code for the trigger follows:

SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO

CREATE TRIGGER CTrig_Logic_Update_Customer
ON RM00101

AFTER UPDATE
AS

IF UPDATE(CUSTNMBR) or
UPDATE(CUSTCLAS) or
UPDATE(CNTCPRSN) or
UPDATE(STMTNAME) or
UPDATE(SHRTNAME) or
UPDATE(TAXSCHID) or
UPDATE(ADDRESS1) or
UPDATE(ADDRESS2) or
UPDATE(ADDRESS3) or
UPDATE(CITY) or
UPDATE(STATE) or
UPDATE(ZIP) or
UPDATE(PHONE1) or
UPDATE(FAX) or
UPDATE(SLPRSNID) or
UPDATE(PYMTRMID) or
UPDATE(PRCLEVEL) or
UPDATE(SALSTERR) or
UPDATE(INACTIVE) or
UPDATE(HOLD) or
UPDATE(CRLMTAMT)

BEGIN

DECLARE @Server_Name Varchar(25),
@Logic_DB_Name Varchar(25),
@SQLStr nvarchar(1000),
@CustomerN int,
@SICCode int,
@ARContact Varchar(35),
@LongName Varchar(50),
@CustomerName Varchar(24),
@SalesTaxCode Int,
@AddrLine1 Varchar(40),
@AddrLine2 Varchar(40),
@AddrLine3 Varchar(40),
@City Varchar(30),
@StateProv Varchar(4),
@PostalCode Varchar(15),
@TelephoneN Varchar(25),
@FaxTelephoneN Varchar(25),
@SalespersonN Int,
@TermsCode Varchar(60), -- Put the customer terms into the CommentN1 field
@CustRateSched Int,
@SalesAreaCode Int,
@InactivePurge Tinyint,
@CreditStatus Tinyint,
@CreditLimit Int

------- Get the new Customer data from Inserted table

SELECT @CustomerN = CAST(RTRIM(i.CUSTNMBR) as Integer),
@SICCode = ISNULL((SELECT Dex_Row_ID FROM RM00201 WHERE RM00201.CLASSID = i.CUSTCLAS),0),
@ARContact = RTRIM(i.CNTCPRSN),
@LongName = RTRIM(i.STMTNAME),
@CustomerName = RTRIM(i.SHRTNAME),
@SalesTaxCode = ISNULL((SELECT Dex_Row_ID FROM TX00101 WHERE TX00101.TAXSCHID = i.TAXSCHID),0),
@AddrLine1 = RTRIM(i.ADDRESS1),
@AddrLine2 = RTRIM(i.ADDRESS2),
@AddrLine3 = RTRIM(i.ADDRESS3),
@City = RTRIM(i.CITY),
@StateProv = RTRIM(LEFT(i.STATE,2)),
@PostalCode = RTRIM(i.ZIP),
@TelephoneN = RTRIM(LEFT(i.PHONE1,10)),
@FaxTelephoneN = RTRIM(LEFT(i.FAX,10)),
@SalespersonN = RTRIM(i.SLPRSNID),
@TermsCode = RTRIM(i.PYMTRMID),
@CustRateSched = RTRIM(i.DEX_ROW_ID),
@SalesAreaCode = ISNULL((SELECT Dex_Row_ID FROM RM00303 WHERE RM00303.SALSTERR = i.SALSTERR),0),
@InactivePurge = i.INACTIVE,
@CreditStatus = i.HOLD,
@CreditLimit = i.CRLMTAMT
FROM inserted i

------- Get Logic server name and database name

SELECT @Server_Name = RTRIM(l.Server_Name),
@Logic_DB_Name = RTRIM(l.Logic_DB_Name)
FROM tbl_Logic_DB l

------- Insert new Customer record into Logic database

SET @SQLStr = 'UPDATE [' + @Server_Name + '].[' + @Logic_DB_Name + '].dbo.[Customer] ' + '
SET SICCode = ' + CAST(@SICCode as varchar(10)) + ', ' + '
ARContact = ''' + @ARContact + ''', ' + '
LongName = ''' + @LongName + ''', ' + '
CustomerName = ''' + @CustomerName + ''', ' + '
SalesTaxCode = ' + CAST(@SalesTaxCode as varchar(10)) + ', ' + '
AddrLine1 = ''' + @AddrLine1 + ''', ' + '
AddrLine2 = ''' + @AddrLine2 + ''', ' + '
AddrLine3 = ''' + @AddrLine3 + ''', ' + '
City = ''' + @City + ''', ' + '
StateProv = ''' + @StateProv + ''', ' + '
PostalCode = ''' + @PostalCode + ''', ' + '
FaxTelephoneN = ''' + @TelephoneN + ''',' + '
SalespersonN = ' + CAST(@SalespersonN as varchar(10)) + ', ' + '
CommentN1 = ''' + @TermsCode + ''', ' + '
CustRateSched = ' + CAST(@CustRateSched as varchar(10)) + ', ' + '
SalesAreaCode = ' + CAST(@SalesAreaCode as varchar(10)) + ', ' + '
InactivePurge = ' + CAST(@InactivePurge as varchar(10)) + ', ' + '
CreditStatus = ' + CAST(@CreditStatus as varchar(10)) + ', ' + '
CreditLimit = ' + CAST(@CreditLimit as varchar(10)) + ' ' + '
WHERE CustomerN = ' + CAST(@CustomerN as varchar(10))


SET ANSI_NULLS ON
SET ANSI_WARNINGS ON
SET XACT_ABORT ON

EXEC sp_executesql @SQLStr

END

GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO

View 1 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

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

Allowing + In Field

Aug 20, 2007

how can i setup an input field and SQL column to allow a user to enter something such as: '1+' into the field and the db? i get an error due to the '+'.

View 1 Replies View Related

Allowing Users Access To Their DB Only?

Apr 6, 2004

Hey all.

I'm trying to set up SQL Server so that people with Enterprise Mgr can create a DB registration to their DB only (sql.yoursite.com). Are there any tutorials out there for doing this?

Thanks for the help!

View 3 Replies View Related

Allowing User To Backup Only

Apr 16, 2008

I have databases

TESTDB db owner testuer

Login testuser


When right clicking on logins i see dbo
When open this i see testuser

So i clicked on Role Members db_backupoperator was denied
had to do it on the owner schema and select db_backupoperator

Not sure why the role member is permitted.

View 10 Replies View Related

Allowing Remote Connections

Apr 18, 2008

Hi All,

I installed full version of SqlServer 2005. Iam able to Connect to all the systems that are in Intranet. But iam not able to Connect to the external systems (or) remote Connections. I followed all the steps that are in the following URL support.microsoft.com/kb/914277
Still iam getting the problem. Show me a way in this issue.


Thanks&Regards,
SrinivasReddy

View 3 Replies View Related

SQL 2K5 Not Allowing Connection From Win Service

May 28, 2008

Hi All,

I have written a windows service using VB.NET that connects to a database and performs several tasks. The service is working correctly and has been fully tested against SQL Server 2000. I have recently moved to SQL Server 2005 and now, the service will not connect to the database.

I have setup and tried several different users, but none work, I get the following message:

Login failed for user 'OEESYSTEMS'

The server instance, username and password I specify are all correct.

The service is running on the same server as SQL Server. I can connect through a web application, and through ODBC. The server is set to use SQL server and windows authentication, and is setup and successfully allows remote connections.

It looks like SQL server sees that a windows service is trying to connect and does not allow it.

For the love of god, can anyone help with this issue.

Thank you.

View 1 Replies View Related

Not Allowing Remote Connections

Mar 3, 2007

TITLE: Connect to Database Engine
------------------------------

Cannot connect to FRI-0503SQLEXPRESS.

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

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: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.) (Microsoft SQL Server, Error: 10061)

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

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

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


I have recieved this error and i have changed the surface area configuration to allow remote connections but it still won't allow them after i start and restart the server service. is there any way to fix this i have reinstalled several times and that has not yet fixed the problem either.

View 5 Replies View Related

Allowing Null Values

Aug 1, 2007

I have a flat file that I'm reading from and loading my tables with. In that file I have a column that has numbers (2000,1999,1998 and so on) and the column that they are being loaded into is defined as an INT. The issue I'm running into is that the first 50 or so rows in the flat file is empty for this column so I'm getting an error message. If I put numbers in that column in the flat file it works, if i remove them it fails. How can I allow for NULL values for my INT column on the database table?

here is the error I'm getting:

[OLE DB Destination [182]] Error: There was an error with input column "SalesYear" (7259) on input "OLE DB Destination Input" (195). The column status returned was: "The value could not be converted because of a potential loss of data.".

View 12 Replies View Related

Not Allowing Remote Connections

Mar 3, 2007

TITLE: Connect to Database Engine
------------------------------

Cannot connect to FRI-0503SQLEXPRESS.

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

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: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.) (Microsoft SQL Server, Error: 10061)

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

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

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


this is the error message i get and i don't know how to correct it. i have tried going into surface area configuration and setting it allow remote connections but that hasn't changed anything. i am at a loss for how to correct this situation.

View 1 Replies View Related

Allowing Null Dates

Aug 4, 2007

My users want to be able to enter nothing in a date field.

I'm using asp.net v2, vb.net, and VS 2005 for my application. I'm not sure what to do or what code to write to allow the user not to enter a date and keep from hitting the sqldatetime overflow error.

I could use some help.

Thanks

View 4 Replies View Related

User Log-on, Allowing Administrator Only

Apr 18, 2006

Please forgive my post, as I am not a network tech, however I provide pc support to the city offices where I live and they are in need of help.

Physical box and pc's moved to a new location. All setup with proper cabling, etc. At first log on after the move all users to log on as normal, a day or two later, only the Administrator can log on and there is only one administrator profile.

Any duh quick fixes to check out, as this brings down 4 city offices.

Thanks in advance.

View 4 Replies View Related

Allowing Remote Connections

Apr 18, 2008



Hi All,

I Installed full version of SqlServer 2005. Iam able to connect to all of our systems which are in intranet. But iam not able to connect to external system. I performed all the steps that are mentioned in the following URL support.microsoft.com/kb/914277 . Even then i was not able to connect to the remote systems. I request you to show me a solution to this issue.


Thanks&Regards,

SrinivasReddy.Tadi

View 1 Replies View Related

Allowing Non-sa Users To Run And Schedule Tasks

Jun 12, 2001

Developers want to give users the ability to schedule and run processes, which may be executables, T-SQL, DTS, Active Scripting, etc. I don't want to enable a proxy account due to the well documented security problems. Has anyone come up with a good way to do this?

View 1 Replies View Related

Ask For Password Prior To Allowing Access

Nov 13, 2003

I am trying to make a connection to sql server using sspi (windows authentication), however, I do not wish to use the built in tokenauthentication system. Administrators are worried about somebody using an unattended logged on computer to gain access to the database. So I am left with using sql server authentication (which I am not fond of doing, more password administration) or what I would like to do is use windows authentication but make the user enter thier windows password prior to logging into sql server. Is there a way? Thanks in Advance.

Kent

View 2 Replies View Related

Allowing Users To Edit Database

Jul 11, 2006

I'm relatively new to administering SQL Server, hence this basic question.

What are the standard practice tool(s)/methods for allowing users access to a database to edit data? In this case, these are engineers (not programmers) that need to edit some values. The practice in the past has been to install Enterprise Manager on their PC. However, this does not seem proper to me and I was thinking more along the lines of having them use Access instead.

I compare Enterpise Manager in SQL Server as an equilvalent to Enterprise Manager in Oracle - these are tools only for use by database administrators. Is this a correct correlation, or is Enterpise Manager in SQL Server a tool that users (and programmers?) are commonly allowed to use? In the case of common users, I would think not.

Thanks in advance.

View 3 Replies View Related

Allowing SQL Users To Change Password

Jan 26, 2004

Hi guys,

Is there anyway to allow SQL Server users to change their own passwords without giving them rights to "db_securityadmin" ?

Our M$ adviser suggested creating our own app using SQL NS and DMO to do it.

Is there any easier method, reference, download sample from the web?

View 3 Replies View Related

Allowing Users To Truncate Log File

Mar 30, 2007

I would like to allow a particular user to truncate a log file in astored procedure that the user runs every day. At this moment the onlypersonnel that can truncate the log file are personnel with sysadminrights. Is there any way to do this in sql server 2005 withoutgranting this user sysadmin rights (something we REALLY don't want todo)? Thanks for all your help in advance.Dave C.

View 1 Replies View Related

Allowing A User Access To Only A Few Tables

Jul 20, 2005

With MS SQL 2000 Enterprise Manager, is there a way to allow a user accessto only a few tables, but deny the user access to the rest without having togo to all of the tables and denying access? The database has roughly 50tables, but only 3 should be granted to the new user, so as you can see itwould be a painstaking task to manually do this with the *cough* mouse. Or,if I can run some sort of grant script, that would work too. Thank you!

View 2 Replies View Related

Allowing Remote Connections During Setup?

Aug 29, 2006

Is there a way to automatically setup SQL Server Express to allow remote connections during the installation process?

We are deploying SQL Server Express with our application and I really can't ask SMB customers to go through a series of rather complicated steps after our "turn key" setup installs everything in order for any of the other computers in their office to connect.

What's the reasoning behind that, anyway? Why create a database server setup which by default doesn't allow anyone except the server to access it? I guess that makes sense for ASP.NET but the web fad isn't the only platform developers use these days.

Any assistance would be greatly appreciated.

Cheers,

Evan

View 1 Replies View Related

Alter Table Allowing Truncation

Apr 30, 2008

Is there a way to tell an ALTER TABLE statement that truncating data from a string or binary column is okay? Meaning, if I have a NVARCHAR(50) column and I want to change it to NVARCHAR(10), any strings over 10 characters can safely be truncated to 10?

Or do I have to push the columns though an intermediary first?

View 4 Replies View Related

SqlDataSource Not Allowing Insert, Update And Delete

Jul 4, 2006

i have default.aspx file and i put SqlDataSource into my designer form.when i want to configure SqlDataSource it not allowed my to insert, update and delete only insert is allowed.what is the problem and the solution for this case ...thx

View 1 Replies View Related

Allowing Access To Database Only Through Stored Procedures

Aug 31, 2006

I have read that it is possible to configure sql server express  so that the database can only be accessed through stored procedures. Can anyone tell me how to do this. Many thanks.martin

View 2 Replies View Related

Allowing Transformations When Creating Publication For Replication

Dec 2, 2003

I am at my wits end here. For Replication the Books Online clearly state:

"The option to allow transformations is set at the time you create a publication"

However, I cannot find any options that allow me to do this in the Create Publication Wizard.

Once the Publication has been created I see in the Properties in the Subscription Options tab that "Use DTS to transform data before distributing it to a Subscriber" is set to No and there is no way to change it.

Where am I going wrong?

View 1 Replies View Related

Not Allowing Updates Row With Ntext Data Types

Sep 19, 2000

I am running a Access97 front end with a SQL Server 7 backend. On records with an ntext datatype, you are only allowed to update records if the ntext field is null. The tables are linked from access. You get a "cannot update linked table" and "ODBC error #306." Any suggestions??

View 1 Replies View Related

SQL 2012 :: Allowing Access To DECRYPTBYKEY Function

Nov 6, 2015

How to grant users the right to use the DECRYPTBYKEY function to decrypt the data. I have seen some people talk about using a stored procedure or view to surface the decrypted data, but how would you implement that when trying to pull back a single dataset? It would be best to use an inline function to allow the row to be returned decrypted, but opening the keys isn't allowed in the function construct.

So, I know I have to be missing something, but how do you let basic users (db_reader types) decrypt the data they need based on a custom database role? What do I need to give the user permission to?

My setup is simple:
- I have my SMK
- I have a DMK encrypted by password
- I have my self signed certificate
- I have my symmetric Key encrypted by the certificate

View 0 Replies View Related

SQL Express 2005 Going Idle And Not Allowing Connections.

Feb 20, 2007

Just upgraded to SQL Express 2005 from MSDE for Firehouse. Upgrade went great and the db is accessable and running fine. Except when not used for a while. Then I need to restart the db to allow connections of any kind. If I don't I get an error that the db is not accessable and I can't connect. Everything runs fine after until it goes to "sleep" on me again. We upgraded to make use of the 4GB limit as we were at 1.9GB and MSDE was getting a little unhappy.



Any suggestions? Is this a "feature" and if so, is there a script I can run to kick it into working mode again?



Thanks

Chris

View 1 Replies View Related

How To Alter(add) A Table With A Default Value And By Allowing Nulls?

Aug 8, 2007

Hi

I am using this query to alter a table

ALTER TABLE myTable ADD age int NULL DEFAULT(0)

But above query is adding age field by storing Nulls but not with default values

So I need to add age field to the table by storing default value as 0 and by allowing Nulls

Please advice

Thanks

View 5 Replies View Related

Allowing Users To Choose Which File To Import

Feb 13, 2008

I'm building a package that will periodically be used to import data from an excel file to update a SQL database. I've done most of it but I am completely stuck on one bit:

How can I build something in that allows the user to browse for the Excel file to be imported (like you do when you set up the Excel Connection Manager and it asks which file)?

My ideal world would be someway of calling just that part of the Import wizard.

There are lots of things about dynamically choosing the file using variables but they don't allow end-user interaction. It may be that I'm trying to do something I shouldn't.........

HELP!

View 3 Replies View Related

Table Adapter Not Allowing Null String

Sep 27, 2007

I have an SP that I call via table adapter. If I do not pass a value in the string field ('eventRef'), the SP never gets called - it appears that the table adapter is filtering it...? I need to be able to count records that have an 'eventRef' = to the one I pass, including null. This works fine if I pass an 'eventRef', but never runs if that parm is empty.


Here is the TA definition


<asp:ObjectDataSource ConvertNullToDBNull="true" ID="ObjectDataSource1" runat="server" SelectMethod="GetData" TypeName="ImagesByEventTableAdapters.PagedImagesByEvent" OnSelecting="ObjectDataSource1_Selecting" OnSelected="ObjectDataSource1_Selected">

<SelectParameters>

<asp:QueryStringParameter Name="CategoryID" QueryStringField="CategoryID" Type="Int32" DefaultValue="24"/>

<asp:QueryStringParameter Name="EventID" QueryStringField="EventID" Type="Int32"/>

<asp:QueryStringParameter Name="EventRef" QueryStringField="erf" Type="String"/>

<asp:QueryStringParameter Name="PageIndex" QueryStringField="PageIndex" Type="Int32" DefaultValue="0"/>

<asp:Parameter Name="NumRows" Type="Int32" DefaultValue="16"/>

<asp:Parameter Name="ImageCount" Direction="Output" Type="Int32" DefaultValue="0" />

</SelectParameters>

</asp:ObjectDataSource>



And the SP:


set ANSI_NULLS ON

set QUOTED_IDENTIFIER ON

go

ALTER PROCEDURE [dbo].[PagingGetProductsByEvent]

@CategoryID INT,

@EventID INT,

@EventRef CHAR(10)=NULL,

@PageIndex INT,

@NumRows INT,

@ImageCount INT OUTPUT

AS



BEGINdo my stuff....

View 1 Replies View Related

Allowing A Conenction To A SQL Server 2005 Database From Another Computer On A LAN

Mar 8, 2007

I am working with one other person on a VS 2005 vb.net web project that accesses SQL Server 2005.  Both the computers are connected and my partner can run the application on his computer from his VS 2005 but we are getting an error on our first databind to a gridview on the page we are trying to run the error is below
A connection was successfully established with theserver, but then an error occurred during thepre-login handshake.  When connecting to SQL Server2005, this failure may be caused by the fact thatunder the default settings SQL Server does not allowremote connections. (provider: Named Pipes Provider,error: 0 - No process is on the other end of the pipe.)
 
I check the properties of the SQL Server and the check box is checked that says allow remote access.  I am not sure what to do.

View 1 Replies View Related







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