How Do You Account For Errors In SQL Code?

Jan 7, 2005

Hi everyone,





I have a form that is being used by a user, and the form is writing to an sql database, but it gets the "string or binary data would be truncated, the statement has been terminated" error. I realize that this is due to the fact that he filled out a an entry where the respective column length was shorter than what he put in...





I am curious as to how you account for this? What is the industry practice? Is it better to truncate? Make the database columns a huge size? Put in validators for every single control to make sure that the space is an acceptable length? How do you guys account for things that might go wrong when writing to SQL?





Try, Get's?





I am confused as to how to even approach this sort of thing...





Thanks,

View 1 Replies


ADVERTISEMENT

SQL 2012 :: Domain Account Errors Out When Use As Service Accounts

Jul 23, 2014

Installed sql server 2012 enterprise. Runs with the built in account fine.

I tried entering a domain account to run as the service account from sql configuration it fails with the error "the specified network password is not correct".

I tried from services.msc and entered successfully but when I try to restart it fails that the log in credentials are wrong.

the domain account and password I entered are just fine. What's it I should do or missing?

View 3 Replies View Related

Errors In Code

May 14, 2007

set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go

/*************************************************************************************
Description: This store procedure is used to return the district's Rubric Report.
Returns:
RubricReport.ReportID
RubricReport.LastUpdate
RubricReport.LastUpdateBy
RubricReportDetail.LocalPerf
RubricReportDetail.GoalMet
RubricReportTemplate.IndicatorNumber
RubricReportTemplate.Topic
RubricReportTemplate.Part
RubricReportTemplate.ILCDComponent
SppTarget.Target
Parameters:
@DataYears
@County
@District
@LastUpdateBy

*/
ALTER PROCEDURE [dbo].[usp_RubricReportGet]
-- Add the parameters for the stored procedure here
@DataYears CHAR(8),
@County CHAR(2),
@District CHAR(4),
@LastUpdateby VARCHAR(50),
@ReportID INT,
@LastUpdate SMALLDATETIME,
@IndicatorID TINYINT,
@IndicatorNumber VARCHAR(5),
@Number VARCHAR(20),
@FYY CHAR(9),
@Part CHAR(1),
@Years CHAR(8),
@maxLastUpdate SMALLDATETIME,
@LocalPerf DECIMAL(5,4),
@GoalMet BIT,
@Topic VARCHAR(100),
@ILCDComponent VARCHAR(50)


AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from

SET NOCOUNT ON;

-- Get the ReportID and LastUpdate values from Rubric Report Table matching
-- County=@County and District=@District
SELECT ReportID, LastUpdate
FROM RubricReport
WHERE (RubricReport.County = @County) AND (RubricReport.District = @District) AND (RubricReport.DataYears = @DataYears)

-- With table SPPIndicator and SppIndicator11Data, find the maximum value of LastUpdate (@maxLastUpdate)
SELECT @maxLastUpdate FROM (SELECT LastUpdate FROM SPPIndicator UNION ALL SELECT LastUpdate FROM SppIndicator11) AS D


IF @maxLastUpdate > (SELECT LastUpdate FROM RubricReport WHERE (RubricReport.County = @County) AND (RubricReport.District = @District) AND (RubricReport.DataYears = @DataYears))
BEGIN
EXEC usp_RubricReportCalc @DataYears, @County, @District, @LastUpdateBy
END

ELSE

SELECT ReportID, LastUpdate, LastUpdateBy
FROM RubricReport
WHERE RubricReport.ReportID = RubricReportDetail.ReportID

SELECT IndicatorNumber, Topic, Part, ILCDComponent
FROM RubricReportTemplate
WHERE RubricReportDetail.IndicatorID = RubricReportTemplate.IndicatorID


SELECT LocalPerf, GoalMet
FROM RubricReportDetail
WHERE SppTarget.IndicatorNumber = RubricReportDetail.IndicatorID

SELECT Target
FROM SppTarget
WHERE SppTarget.Years = @DataYears

END


I have the above created stored proc. which gives the following errors:

Msg 107, Level 16, State 3, Procedure usp_RubricReportGet, Line 69
The column prefix 'RubricReportDetail' does not match with a table name or alias name used in the query.
Msg 107, Level 16, State 3, Procedure usp_RubricReportGet, Line 73
The column prefix 'RubricReportDetail' does not match with a table name or alias name used in the query.
Msg 107, Level 16, State 3, Procedure usp_RubricReportGet, Line 78
The column prefix 'SppTarget' does not match with a table name or alias name used in the query.


How can I resolve these erros?

View 8 Replies View Related

SQL Code Errors Please Help

Dec 12, 2007

SELECT CUSTNO Customer , ORDERNO Order , O_DATE Order Date

FROM cust_order

WHERE O_DATE = 10-20-03 AND EMPO= '%4'

ORDER BY ORDERNO;

please can anybody identify 4 errors

View 5 Replies View Related

Errors In Function Code

Feb 2, 2007

Hi,

I'm pretty new to SQL and I'm having trouble with a function, probably just syntax. I'm trying to consolidate several rows of data into a single row text field.
The calling program can use views but not functions so I need to get a table into a view with the consolidated lines.

Also, I would think this could be consolidated to a single view that calls one function. Is that possible, how would I do it?

Thanks for any help,
Steve


VIEW WHERE DATA COMES FROM:
CUST_ORDER_ID | LINE_TEXT
number1 | first line item text
number1 | Second line item text
number1 | Third line item text
number2 | first line item text
number2 | Second line item text
...


VIEW I WANT:
CUST_ORDER_ID | CO_LINES_TEXT
number1 | Second line item text 'crlf' Third Line item text
number2 | Second line item text


FUNCTION CODE: This is the function code with errors

CREATE FUNCTION dbo.tvf_NC_CO_LINES_TEXT (@ORDER_ID VARCHAR(20))

RETURNS @NC_CO_LINES TABLE
(
CUST_ORDER_ID VARCHAR(20) PRIMARY KEY NOT NULL,
CO_LINES_TEXT VARCHAR(1000) NULL
)
AS
BEGIN
DECLARE @COLinesString VARCHAR(1000);
SET @ORDER_ID = CUST_ORDER_ID;
SELECT @COLinesString = COALESCE(@COLinesString + Char(13) + Char(10), '') + LINE_STRING
FROM NC_CO_LINES_STRING
WHERE NC_CO_LINES_STRING.CUST_ORDER_ID = @ORDER_ID
SET @COLinesString = CO_LINES_TEXT
RETURN
END;

GO


ERROR MESSAGES:
Msg 207, Level 16, State 1, Procedure tvf_NC_CO_LINES_TEXT, Line 16
Invalid column name 'CUST_ORDER_ID'.
Msg 207, Level 16, State 1, Procedure tvf_NC_CO_LINES_TEXT, Line 20
Invalid column name 'CO_LINES_TEXT'.


VIEW CODE:
SELECT dbo.CUST_ORDER_LINE.CUST_ORDER_ID, CAST(CAST(dbo.CUST_ORDER_LINE.ORDER_QTY AS INT) AS VARCHAR(2))
+ ' ' + dbo.CUST_ORDER_LINE.PART_ID + ' ' + dbo.PART.DESCRIPTION AS LINE_STRING
FROM dbo.CUST_ORDER_LINE INNER JOIN
dbo.PART ON dbo.CUST_ORDER_LINE.PART_ID = dbo.PART.ID
WHERE (dbo.CUST_ORDER_LINE.LINE_NO > 1)

Steve Bermes
Novae Corp.

View 2 Replies View Related

Getting Code Page Errors....

Feb 9, 2006

I am importing some data from my IBM DB2 Z/OS mainframe to SQL Server 2005 using the SSIS import wizard. The wizard automatically converted the DB2 string data before trying to store it to SQL Server. The code page that the wizard chose to do its conversion is the 1252 Ansi Latin. However, I am getting the following error on the address field...."one or more characters had no match in the target code page". Can someone suggest another code page? ASCII? IBM 37?

View 3 Replies View Related

Build Errors With The Code!!

Apr 9, 2007

Hi,

I'm new to SQL Server RS.

I'm getting build errors after writing the following code:

List<ReportParameter> reportParam = new List<ReportParameter>(); reportParam.Add(new ReportParameter("Database", connectionString)); reportParam.Add(new ReportParameter("master_dept", hidMasterDept.Value.ToString().Trim())); reportParam.Add(new ReportParameter("station_id", hidStationId.Value.ToString().Trim())); reportViewer.ServerReport.SetParameters(reportParam)

The error message is as follows:
No overload for method 'ReportParameter' takes '2' arguments

But when I build the page using "Build Page" command from the menu, it builds successfully and then the project build succeeds.

When I modify any other page and build the solution, the same build error for this page occurs again.

Any idea how to resolve this? Been spending a lot of time figuring this out.

Thanks in Advance,

Manjunath HK

View 5 Replies View Related

Code Page Errors In SSIS

Nov 21, 2007



Hi All,
we have a set of packages which has to to be implemented across differnet environments.
the packages invariable uses OLEDB Source/Destination Components.
In these two components the Code Page Property is not Configurable.
so if the package has to be Deployed in a different environment than,where it is Developed it gives a Validation Error.
Is there a Workaround for this problem.
if anybody have faced the problem earlier,please post it.
thanks in advance.
cheers
srikanth

View 1 Replies View Related

RS Custom Code (Permission Errors)

Feb 1, 2008

I created some custom code that will check to see if a file exists on a Windows Share.



Code Snippet
Public Function FileExists(ByVal FileFullPath As String) As Boolean
Try
Dim f As New System.IO.FileInfo(FileFullPath)
Return f.Exists
Catch e As Exception
Return e.Description
End Try
End Function





An example of what I am passing is this:



Code Snippet
\servernamesharenamefilename.txt





I use this code in a TextBox on my Report:



Code Snippet
=IIF(Code.FileExists(Fields!OutPutFileName.Value) = TRUE,"True","False")





I get this error in my report:



Code SnippetSystem.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.CodeAccessPermission.Demand()
at System.IO.FileInfo..ctor(String fileName)
at ReportExprHostImpl.CustomCodeProxy.FileExists(String FileFullPath)
The action that failed was:
Demand
The type of the first permission that failed was:
System.Security.Permissions.FileIOPermission
The Zone of the assembly that failed was:
MyComputer




BUT it works on my local machine. Any Ideas?

View 3 Replies View Related

Whether To Use Local System Account Or Domain Account For Service Account

Jan 5, 2006

During install of SQL Server 2005, we can of course use a domain account or the built-in system account for running the services.  I lean toward domain for obvious reaons but would like to know a +/- to each option and why I'd choose one over the other and what consequences or limitations one may encounter if I choose one over the other.

View 6 Replies View Related

Stored Procedures - How To Return ERRORS To VB.NET Code

Jun 6, 2008

 Hi all, if have problem to display error message in vb.net that comes from a stored procedure. IF ...... then    msgbox "ERROR at Update"    returnvalue = SUCCES ELSE    Msgbox "Successfull Updated"    returnvalue = ERROREND IFHow can I return values from Stored Procedure to VB.NET and then give to User a Message that the Update was successful or not.Thanks to all   

View 2 Replies View Related

Connection String And Permission Errors In The CLR Code

Feb 28, 2008

I have written a CLR function in C# to access a sql server different from the current server where I have deplyed the assembly.


DataSet ds = new DataSet();





SqlCommand sqlCmd = new SqlCommand();

sqlCmd.CommandType = CommandType.StoredProcedure;

string connString = "Data Source=SQLSERVER;Initial Catalog=DATABASE;User ID=userid;Password=password;";

SqlConnection sqlConn = new SqlConnection(connString);

sqlCmd.Connection = sqlConn;

sqlConn.Open();

try

{

SqlDataAdapter sda = new SqlDataAdapter();

sqlCmd.CommandText = "StoredProcedureName";

sqlCmd.Parameters.Add("@Param1", SqlDbType.VarChar);

sqlCmd.Parameters["@Param1"].Value = sParam1;

sda.SelectCommand = sqlCmd;

sda.Fill(ds);

}

finally

{

sqlConn.Close();

}

return ds;

I was getting the following error

"Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."

so I tried doing the following


SqlClientPermission pSql = new SqlClientPermission(System.Security.Permissions.PermissionState.Unrestricted);

pSql.Assert();



and then I get this error


"Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."


Any idea how to remedy this ?

Thanks in advance
- Kan

View 4 Replies View Related

SA Account (DBA System Account) Granting Priveleges But SQL Server 2000 Not Applying Them

Dec 4, 2006

I have been running a script in SQL Server 2000 as sa also as a Active Directory user who has administrator rights (I tested both approaches SQL Server then Windows Authentication) in Query Analyser which grants execute rights to the stored procedures within the database instance and Query Analyser does not give any errors when I run the script. I have made sure that each transaction has a go after it. I then return to Enterprise Manager, check the rights (I apply them to roles so that when we create another SQL Server user we just grant him/her rights to the role) and discover that the role has not been granted the rights. I seems to be occurring only with 2 of the procedures. Is there a known bug that might be causing this?

yours sincerely

Craig Hoy

View 9 Replies View Related

DTS Fails As A Job With Service Startup Account As &#34;System Account&#34;

May 9, 2002

I have several DTS jobs that runs well as a job with my nt login account for the SQL agent service startup account, but if I use the System account
they fail with this error.
" Error opening datafile: Access is denied. Error source: Microsoft Data Transformation Services Flat File Rowset Provider"

The data has change access to the System account under the NT security.

Thank you in advanced.

Jorge

View 2 Replies View Related

Xp_cmdshell Does Not Execute For Non-sysadmin Account Even With Proxy Account

Mar 2, 2004

Hi all, i hope you can help me.

Basically a dts package has been setup that pulls in data from another companies server, this data requires to be on-demand i.e individual users can pull in updates of the data when they require it.

I am using xp_cmdshell and dtsrun to pull in the data. This obviouly works fine for me as i am a member of sysadmin.

Books online quotes " SQL Server Agent proxy accounts allow SQL Server users who do not belong to the sysadmin fixed server role to execute xp_cmdshell"

So i went to the SQL Server Agent Properties 'Job System' tab and unchecked 'Non-sysadmin job step proxy account' and entered a proxy account.

The proxy account has been setup as a Windows user with local administrator privilages and even a member of the sysadmin server role - just in case.

Now when i log onto the db with my test account - a non-sysadmin - and attempt to run the stored proc to import the data i recieved the message 'EXECUTE permission denied on object 'xp_cmdshell', database 'master', owner 'dbo' '

hmm... so basically i have either misunderstood BoL or there is something not quite right in my setup.

I have search the net for a few days now and yet i can find no solution.

Can anyone help?

View 2 Replies View Related

Domain Account Vs Local Account For SQLServerAgent

Jul 20, 2005

Hi there,BOL notes that in order for replication agents to run properly, theSQLServerAgent must run as a domain account which has privledges to loginto the other machines involved in replication (under "SecurityConsiderations" and elsewhere). This makes sense; however, I waswondering if there were any repercussions to using duplicate localaccounts to establish replication where a domain was not available.Anotherwords, create a local windows account "johndoe" on both machines(with the same password), grant that account access to SQL Server onboth machines, and then have SQL Server Agent run as "johndoe" on bothmachines. I do not feel this is an ideal solution but I havecircumstances under which I may not have a domain available; mypreliminary tests seem to work.Also, are there any similar considerations regarding the MSSQLSERVERservice, or can I always leave that as local system?Dave

View 1 Replies View Related

Domain Account Without A SQL Login Account

Apr 25, 2007

I have a situation that I have discovered in our QA database that I need to resolve. When I looked at the Activity Monitor for our server, I discovered that a process is running under a domain user account for one of our .Net applications. The problem is that that domain user account has not been created as a SQL login account on the server. I am trying to figure out how someone can log in to the database server with a domain user account that has not been added to SQL Server as a login account.



Does anyone have any insight on this? I don't like the idea of someone being able to create domain account that can access the database without me granting them specific access.



- Larry

View 6 Replies View Related

SQL Server 2008 :: How To Make Sproc Return Errors For Underlying Table Errors

Jul 1, 2015

I recently updated the datatype of a sproc parameter from bit to tinyint. When I executed the sproc with the updated parameters the sproc appeared to succeed and returned "1 row(s) affected" in the console. However, the update triggered by the sproc did not actually work.

The table column was a bit which only allows 0 or 1 and the sproc was passing a value of 2 so the table was rejecting this value. However, the sproc did not return an error and appeared to return success. So is there a way to configure the database or sproc to return an error message when this type of error occurs?

View 1 Replies View Related

Parent Package Reports Failure On Errors, But No Errors In Log

Jul 31, 2006

I have a parent package that calls child packages inside a For Each container. When I debug/run the parent package (from VS), I get the following error message: Warning: The Execution method succeeded, but the number of errors raised (3) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.

It appears to be failing while executing the child package. However, the logs (via the "progress" tab) for both the parent package and the child package show no errors other than the one listed above (and that shows in the parent package log). The child package appears to validate completely without error (all components are green and no error messages in the log). I turned on SSIS logging to a text file and see nothing in there either.

If I bump up the MaximumErrorCount in the parent package and in the Execute Package Task that calls the child package to 4 (to go one above the error count indicated in the message above), the whole thing executes sucessfully. I don't want to leave the Max Error Count set like this. Is there something I am missing? For example are there errors that do not get logged by default? I get some warnings, do a certain number of warnings equal an error?

Thanks,

Lee

View 5 Replies View Related

How To Solve 0 Allocation Errors And 1 Consistency Errors In

Apr 20, 2006

Starwin writes "when i execute DBCC CHECKDB, DBCC CHECKCATALOG
I reveived the following error.
how to solve it?



Server: Msg 8909, Level 16, State 1, Line 1 Table error: Object ID -2093955965, index ID 711, page ID (3:2530). The PageId in the page header = (34443:343146507).
. . . .
. . . .


CHECKDB found 0 allocation errors and 1 consistency errors in table '(Object ID -1635188736)' (object ID -1635188736).
CHECKDB found 0 allocation errors and 1 consistency errors in table '(Object ID -1600811521)' (object ID -1600811521).

. . . .
. . . .

Server: Msg 8909, Level 16, State 1, Line 1 Table error: Object ID -8748568, index ID 50307, page ID (3:2497). The PageId in the page header = (26707:762626875).
Server: Msg 8909, Level 16, State 1, Line 1 Table error: Object ID -7615284, index ID 35836, page ID (3:2534). The PageId in the page heade"

View 1 Replies View Related

Help With Converting Code: VB Code In SQL Server 2000-&&>Visual Studio BI 2005

Jul 27, 2006

Hi all--I'm trying to convert a function which I inherited from a SQL Server 2000 DTS package to something usable in an SSIS package in SQL Server 2005. Given the original code here:
Function Main()
on error resume next
dim cn, i, rs, sSQL
Set cn = CreateObject("ADODB.Connection")
cn.Open "Provider=sqloledb;Server=<server_name>;Database=<db_name>;User ID=<sysadmin_user>;Password=<password>"
set rs = CreateObject("ADODB.Recordset")
set rs = DTSGlobalVariables("SQLstring").value

for i = 1 to rs.RecordCount
sSQL = rs.Fields(0).value
cn.Execute sSQL, , 128 'adExecuteNoRecords option for faster execution
rs.MoveNext
Next

Main = DTSTaskExecResult_Success

End Function

This code was originally programmed in the SQL Server ActiveX Task type in a DTS package designed to take an open-ended number of SQL statements generated by another task as input, then execute each SQL statement sequentially. Upon this code's success, move on to the next step. (Of course, there was no additional documentation with this code. :-)

Based on other postings, I attempted to push this code into a Visual Studio BI 2005 Script Task with the following change:

public Sub Main()

...

Dts.TaskResult = Dts.Results.Success

End Class

I get the following error when I attempt to compile this:

Error 30209: Option Strict On requires all variable declarations to have an 'As' clause.

I am new to Visual Basic, so I'm on a learning curve here. From what I know of this script:
- The variables here violate the new Option Strict On requirement in VS 2005 to declare what type of object your variable is supposed to use.

- I need to explicitly declare each object, unless I turn off the Option Strict On (which didn't seem recommended, based on what I read).

Given this statement:

dim cn, i, rs, sSQL

I'm looking at "i" as type Integer; rs and sSQL are open-ended arrays, but can't quite figure out how to read the code here:

Set cn = CreateObject("ADODB.Connection")

cn.Open "Provider=sqloledb;Server=<server_name>;Database=<db_name>;User ID=<sysadmin_user>;Password=<password>"

set rs = CreateObject("ADODB.Recordset")

This code seems to create an instance of a COM component, then pass provider information and create the recordset being passed in by the previous task, but am not sure whether this syntax is correct for VS 2005 or what data type declaration to make here. Any ideas/help on how to rewrite this code would be greatly appreciated!

View 7 Replies View Related

How To Show Description In Report Instead Of Code (Desc For Code Is In Master Table)

Mar 28, 2007

Dear Friends,



I am having 2 Tables.

Table 1: AddressBook
Fields --> User Name, Address, CountryCode



Table 2: Country
Fields --> Country Code, Country Name


Step 1 : I have created a Cube with these two tables using SSAS.



Step 2 : I have created a report in SSRS showing Address list.

The Column in the report are User Name, Address, Country Name



But I have no idea, how to convert this Country Code to Country name.

I am generating the report using the Layout tab. ( Data | Layout | Preview ) Report1.rdl [Design]



Anyone help me to solve this issue. Because, in our project most of the transaction tables have Code and Code description in master table. I need to convert all code into corresponding description in all my reports.




Thanks in advance.





Regards
Ramakrishnan
Singapore
28 March 2007

View 4 Replies View Related

Many Lines Of Code In Stored Procedure && Code Behind

Feb 24, 2008

Hello,
I'm using ASP.Net to update a table which include a lot of fields may be around 30 fields, I used stored procedure to update these fields. Unfortunatily I had to use a FormView to handle some TextBoxes and RadioButtonLists which are about 30 web controls.
I 've built and tested my stored procedure, and it worked successfully thru the SQL Builder.The problem I faced that I have to define the variable in the stored procedure and define it again the code behind againALTER PROCEDURE dbo.UpdateItems
(
@eName nvarchar, @ePRN nvarchar, @cID nvarchar, @eCC nvarchar,@sDate nvarchar,@eLOC nvarchar, @eTEL nvarchar, @ePhone nvarchar,
@eMobile nvarchar, @q1 bit, @inMDDmn nvarchar, @inMDDyr nvarchar, @inMDDRetIns nvarchar,
@outMDDmn nvarchar, @outMDDyr nvarchar, @outMDDRetIns nvarchar, @insNo nvarchar,@q2 bit, @qper2 nvarchar, @qplc2 nvarchar, @q3 bit, @qper3 nvarchar, @qplc3 nvarchar,
@q4 bit, @qper4 nvarchar, @pic1 nvarchar, @pic2 nvarchar, @pic3 nvarchar, @esigdt nvarchar, @CCHName nvarchar, @CCHTitle nvarchar, @CCHsigdt nvarchar, @username nvarchar,
@levent nvarchar, @eventdate nvarchar, @eventtime nvarchar
)
AS
UPDATE iTrnsSET eName = @eName, cID = @cID, eCC = @eCC, sDate = @sDate, eLOC = @eLOC, eTel = @eTEL, ePhone = @ePhone, eMobile = @eMobile,
q1 = @q1, inMDDmn = @inMDDmn, inMDDyr = @inMDDyr, inMDDRetIns = @inMDDRetIns, outMDDmn = @outMDDmn,
outMDDyr = @outMDDyr, outMDDRetIns = @outMDDRetIns, insNo = @insNo, q2 = @q2, qper2 = @qper2, qplc2 = @qplc2, q3 = @q3, qper3 = @qper3,
qplc3 = @qplc3, q4 = @q4, qper4 = @qper4, pic1 = @pic1, pic2 = @pic2, pic3 = @pic3, esigdt = @esigdt, CCHName = @CCHName,
CCHTitle = @CCHTitle, CCHsigdt = @CCHsigdt, username = @username, levent = @levent, eventdate = @eventdate, eventtime = @eventtime
WHERE (ePRN = @ePRN)
and the code behind which i have to write will be something like thiscmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@eName", ((TextBox)FormView1.FindControl("TextBox1")).Text);cmd.Parameters.AddWithValue("@ePRN", ((TextBox)FormView1.FindControl("TextBox2")).Text);
cmd.Parameters.AddWithValue("@cID", ((TextBox)FormView1.FindControl("TextBox3")).Text);cmd.Parameters.AddWithValue("@eCC", ((TextBox)FormView1.FindControl("TextBox4")).Text);
((TextBox)FormView1.FindControl("TextBox7")).Text = ((TextBox)FormView1.FindControl("TextBox7")).Text + ((TextBox)FormView1.FindControl("TextBox6")).Text + ((TextBox)FormView1.FindControl("TextBox5")).Text;cmd.Parameters.AddWithValue("@sDate", ((TextBox)FormView1.FindControl("TextBox7")).Text);
cmd.Parameters.AddWithValue("@eLOC", ((TextBox)FormView1.FindControl("TextBox8")).Text);cmd.Parameters.AddWithValue("@eTel", ((TextBox)FormView1.FindControl("TextBox9")).Text);
cmd.Parameters.AddWithValue("@ePhone", ((TextBox)FormView1.FindControl("TextBox10")).Text);
cmd.Parameters.AddWithValue("@eMobile", ((TextBox)FormView1.FindControl("TextBox11")).Text);
So is there any way to do it better than this way ??
Thank you

View 2 Replies View Related

Custom Code (Embedded Code) Question

Oct 16, 2007



Hi all,

Could someone tell me if custom code function can capture the event caused by a user? For example, onclick event on the rendered report?

Also, can custom code function alter the parameters of the report, or refresh the report?

Thanks.

View 2 Replies View Related

Putting SqlDataSource Code In Code-behind

Jan 25, 2007

Hi,I need some help here. I have a SELECT sql statement that will query the table. How do I get the return value from the sql statement to be assigned to a label. Any article talk about this? Thanks  geniuses.  

View 2 Replies View Related

&&<Code&&>-8462&&</Code&&>

Apr 19, 2006

Hi:

My service broker is working with 2 different instances in local server.But could not able to get working on 2 different servers because of Conversation ID cannot be associated with an active conversation error which I have posted.

After I receive the message successfully...in the end I get this message sent...

<Error xmlns="http://schemas.microsoft.com/SQL/ServiceBroker/Error">

<Code>-8462</Code>

<Description>The remote conversation endpoint is either in a state where no more messages can be exchanged, or it has been dropped.</Description>

</Error>

Why am i gettting this error after the conversation.

Thanks,

Pramod

View 7 Replies View Related

SSIS Error Code DTS_E_OLEDBERROR. An OLE DB Error Has Occurred. Error Code: 0x8000FFFF.

Jan 28, 2008

Hi All,

Recently in an SSIS package I am getting the following error for a particular Data flow task.





Error: 2008-01-25 12:01:48.58

Code: 0xC0202009

Source: Import Datasynapse Data User Events Source [3017]

Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x8000FFFF.

End Error

Error: 2008-01-25 12:01:48.73

Code: 0xC004701A

Source: Import Datasynapse Data DTS.Pipeline

Description: component "User Events Source" (3017) failed the pre-execute phase and returned error code 0xC0202009.

End Error

Our guess is when the data size of User Events table is more it throws this error. If we try to transfer small subset of data it succeeds. What could be reason for this error?

Since this is very urgent, immediate response would be very much appreciated.

Thanks & Regards,
Prakash Srinivasan

View 4 Replies View Related

SA Account

Aug 23, 2001

Hello everyone
I need some advice regarding security
My security officier wants me to disable the sa account on all my SQL Servers.
NT Security for the sysadmin role is already setup for all my servers
for the group "Domain DBAs"

Could someone give the pros and cons.
this Person wants the ability tho activate the sa account at will. (he comes from the AS400 Mind frame)

Second question are there any good books or courses that talk about securing SQL Server 7.0, 2000, etc.

Thanks

View 1 Replies View Related

Sa Account With NT

Jul 14, 2000

I have taken over a NT 4 and SQL Server 7 system that
has a NT account called SA. No one seems to know what it
is for. I thought that the SA account was only a SQL login.
has anyone seen this?
Thanks

View 1 Replies View Related

SA Account

Oct 13, 2000

Scenario: My client has 4 sql boxes with applications connecting to them via various methods (ado, odbc, etc.). Some of the applications have the SA login and pwd hard coded. Too many users have the SA pwd so they want to change the pwd without affecting the applications. Well, they haven't heard of Source Safe until I got here and the projects for the applications are nowhere to be found. They don't want to hear about rewriting the applications.

Suggestions: I'm wondering if I can create an account with the same priviledges of SA and modify the SA account. I'm not sure what's possible at this point because they have taken away most of my options.

If anyone has any suggestions, I would appreciate it.

Thanks for your help.

View 1 Replies View Related

Sa Account

Nov 5, 2007

This is my first time to install the SQL 2005 on my VPC for testing purpose, I don't recall that I did configure the sa account during the instalation.
Is their is any way after the installation to configure the sa account with a password? Please advice

Thanks

View 12 Replies View Related

SQL SERVER ACCOUNT

Feb 20, 2008

How can I find out what account sql server is running under?

View 2 Replies View Related

Can't See ASPNET Account

Mar 24, 2008

I installed SQL Server 2005 and Visual Studio 2005 and have discovered that the ASPNET machine account was not added as a user when going into "Computer Management". I obviously need this to run ASP.net apps.
I tried going to the Administrators group to add user ASPNET, but the system can't find this user.
How can I install the ASPNET account?
 
makimix 

View 3 Replies View Related







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