Any One Solve The Error In The Code

Apr 10, 2008

hi,

I am working with c# windowsa application. i want to connect to the .sdf file in button click event.I am writing this code

string str= "D:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\SQL Server\Mobile\v3.0\Northwind.sdf";
SqlCeConnection cn = new SqlCeConnection(str);
cn.Open();
it is not working.
I am getting this error

Unable to load DLL 'sqlceme30.dll': The specified module could not be found.

Any help me to conncet to .sdf file

Regards,
venkat.

View 8 Replies


ADVERTISEMENT

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

How Can I Solve This Error XML Parsing Error: No Element Found

Nov 13, 2007

 heres my code behind in UploadImage.aspx.vb _____________________________________________________________________________________________________________________________Imports System.Data.SqlClientImports System.ConfigurationImports System.IOPartial Class UploadImage    Inherits System.Web.UI.Page    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click        Dim conn As New SqlConnection        Dim comm As New SqlCommand        Dim connStr As String        connStr = ConfigurationManager.ConnectionStrings("TESDA").ConnectionString        conn = New SqlConnection(connStr)        comm = New SqlCommand("Insert into TImage (CategoryName,Picture,MimeType) VALUES (@name,@pic,@type)", conn)        'gi convert and image to byte array        Dim data(FileUpload1.PostedFile.ContentLength - 1) As Byte        FileUpload1.PostedFile.InputStream.Read(data, 0, FileUpload1.PostedFile.ContentLength)        comm.Parameters.Add("name", System.Data.SqlDbType.Text)        comm.Parameters("name").Value = System.IO.Path.GetFileName(FileUpload1.PostedFile.FileName).ToLower        comm.Parameters.Add("pic", System.Data.SqlDbType.Image)        comm.Parameters("pic").Value = data        comm.Parameters.Add("type", System.Data.SqlDbType.NChar)        comm.Parameters("type").Value = FileUpload1.PostedFile.ContentType        If FileUpload1.HasFile = True Then            Try                conn.Open()                comm.ExecuteScalar()                Label1.Text = "Successfully uploaded"                conn.Close()            Finally            End Try        End If    End Sub    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load            End Sub    Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click        Server.Transfer("image.aspx")    End SubEnd Class______________________________________________________________________________________________________________________________then here my code behind in Image.aspx.vb________________________________________________________________________________________________________Imports System.Data.SqlClientImports System.ConfigurationPartial Class image    Inherits System.Web.UI.Page    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load        Dim conn As New SqlConnection        Dim comm As New SqlCommand        Dim connStr As String        Dim reader As SqlDataReader        Dim dataBuffer() As Byte        connStr = ConfigurationManager.ConnectionStrings("TESDA").ConnectionString        conn = New SqlConnection(connStr)        comm = New SqlCommand("Select * from  TImage where no = @no", conn)        comm.Parameters.Add("no", System.Data.SqlDbType.Int)        comm.Parameters("no").Value = 5        conn.Open()        reader = comm.ExecuteReader        reader.Read()        Response.Clear()        Response.AddHeader("Content-type", reader("CategoryName"))        Response.AddHeader("Content-type", reader("MimeType"))        Dim blen As Integer = CType(reader("picture"), Byte()).Length        dataBuffer = reader("Picture")        Response.OutputStream.Write(dataBuffer, 0, blen)        Response.Close()        conn.Close()    End SubEnd Class_____________________________________________________________________________________________________________________ When I am going to call the Image.aspx it always prompt this error:XML Parsing Error: no element foundLocation: http://localhost:4730/tesdaweb/UploadImage.aspxLine Number 1, Column 1:Is there something wrong in my codes... Please helpthanks... 

View 1 Replies View Related

How Do I Solve This Error?

Nov 27, 2007

This is my error message

Error converting data type varchar to numeric.
All the TotAct are varchars in my data base.. and i want to convert it to Decimal so that i add or subract things in the reprot...
I tried doing

Cast(TotAct1 as decimal(19,4)) but it doesnt let me do it ,



Code Block
DECLARE @tbl table
(
tblId smallint IDENTITY(1,1),
ParticipantId int,
LoanId int,
Name1 char(2),
NDesc1 char(30),
TotAct1 decimal(19,4),
Name2 char(2),
NDesc2 char(30),
TotAct2 decimal(19,4),
Name3 char(2),
NDesc3 char(30),
TotAct3 decimal(19,4),
Name4 Char(2),
NDesc4 char(30),
TotAct4 decimal(19,4),
Name5 char(2),
NDesc5 char(30),
TotAct5 decimal(19,4),
Name6 char(2),
NDesc6 char(30),
TotAct6 decimal(19,4),
Name7 char(2),
NDesc7 char(30),
TotAct7 decimal(19,4),
Name8 char(2),
NDesc8 char(30),
TotAct8 decimal(19,4),
Name9 char(2),
NDesc9 char(30),
TotAct9 decimal(19,4),
Name10 char(2),
NDesc10 char(30),
TotAct10 decimal(19,4),
Name11 char(2),
NDesc11 char(30),
TotAct11 decimal(19,4),
Name12 char(2),
NDesc12 char(30),
TotAct12 decimal(19,4),
Name13 char(2),
NDesc13 char(30),
TotAct13 decimal(19,4),
Name14 char(2),
NDesc14 char(30),
TotAct14 decimal(19,4),
Name15 char(2),
NDesc15 char(30),
TotAct15 decimal(19,4),
Name16 char(2),
NDesc16 char(30),
TotAct16 decimal(19,4),
Name17 char(2),
NDesc17 char(30),
TotAct17 decimal(19,4),
Name18 char(2),
NDesc18 char(30),
TotAct18 decimal(19,4),
Name19 char(2),
NDesc19 char(30),
TotAct19 decimal(19,4),
Name20 char(2),
NDesc20 char(30),
TotAct20 decimal(19,4)
)








Code Block
Insert into @tbl
SELECT
pf.ParticipantId,
pf.PortfolioId,
PortfolioName,
pf.FundId LoanFundId,
CASE When FundName Is Null Then ShortName ELSE FundName END as FundNames,
Act1 as Name1,
a.Description as NDesc1,
TotAct1,
Act2 as Name2,
b.Description as NDesc2,
TotAct2,
Act3 as Name3,
c.Description as NDesc3,
TotAct3,
Act4 as Name4,
d.Description as NDesc4,
TotAct4,
Act5 as Name5,
e.Description as NDesc5,
TotAct5,
Act6 as Name6,
fi.Description as NDesc6,
TotAct6,
Act7 as Name7,
g.Description as NDesc7,
TotAct7,
Act8 as Name8,
h.Description as NDesc8,
TotAct8,
Act9 as Name9,
i.Description as NDesc9,
TotAct9,
Act10 as Name10,
j.Description as NDesc10,
TotAct10,
Act11 as Name11,
k.Description as NDesc11,
TotAct11,
Act12 as Name12,
l.Description as NDesc12,
TotAct12,
Act13 as Name13,
m.Description as NDesc13,
TotAct13,
Act14 as Name14,
n.Description as NDesc14,
TotAct14,
Act15 as Name15,
o.Description as NDesc15,
TotAct15,
Act16 as Name16,
p1.Description as NDesc16,
TotAct16,
Act17 as Name17,
q.Description as NDesc17,
TotAct17,
Act18 as Name18,
r.Description as NDesc18,
TotAct18,
Act19 as Name19,
s.Description as NDesc19,
TotAct19,
Act20 as Name20,
t.Description as NDesc20,
TotAct20

FROM

ParticipantPlanFundBalances1 pf
Left Outer JOIN Fund f
On f.FundId = pf.FundId
LEFT Join PlanPortfolio p
On pf.PortfolioId = p.PortfolioId
Left outer Join AscActCodes a
on pf.Act1 = a.Name
left outer Join AscActCodes b
on pf.Act2 = b.Name
left outer Join AscActCodes c
on pf.Act3 = c.Name
left outer Join AscActCodes d
on pf.Act4 = d.Name
left outer Join AscActCodes e
on pf.Act5 = e.Name
left outer Join AscActCodes fi
on pf.Act6 = fi.Name
left outer Join AscActCodes g
on pf.Act7 = g.Name
left outer Join AscActCodes h
on pf.Act8 = h.Name
left Outer Join AscActCodes i
on pf.Act9 = i.Name
left Outer Join AscActCodes j
on pf.Act10 = j.Name
left outer Join AscActCodes k
on pf.Act11 = k.Name
left outer Join AscActCodes l
on pf.Act12 = l.Name
left outer Join AscActCodes m
on pf.Act13 = m.Name
left outer Join AscActCodes n
on pf.Act14 = n.Name
left outer Join AscActCodes o
on pf.Act15 = o.Name
left outer Join AscActCodes p1
on pf.Act16 = p1.Name
left outer Join AscActCodes q
on pf.Act17 = q.Name
left outer Join AscActCodes r
on pf.Act18 = r.Name
left outer Join AscActCodes s
on pf.Act19 = s.Name
left outer Join AscActCodes t
on pf.Act20 = t.Name
WHERE
pf.FundId <> 0
AND
PeriodId = @PeriodId
AND
pf.PlanId = @PlanId
AND
ParticipantId = @ParticipantId






Any help will be appreciated
Regards
Karen

View 13 Replies View Related

How Can I Solve This Error

Sep 18, 2007



Msg 4864, Level 16, State 1, Procedure usp_LoadASC, Line 138

Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 1, column 6 (ElectionPct).

Msg 4864, Level 16, State 1, Procedure usp_LoadASC, Line 138

Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 2, column 6 (ElectionPct).

Msg 4864, Level 16, State 1, Procedure usp_LoadASC, Line 138

Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 3, column 6 (ElectionPct).

Msg 4864, Level 16, State 1, Procedure usp_LoadASC, Line 138

Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 4, column 6 (ElectionPct).

Msg 4864, Level 16, State 1, Procedure usp_LoadASC, Line 138

Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 5, column 6 (ElectionPct).

Msg 4864, Level 16, State 1, Procedure usp_LoadASC, Line 138

Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 6, column 6 (ElectionPct).

Msg 4864, Level 16, State 1, Procedure usp_LoadASC, Line 138

Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 7, column 6 (ElectionPct).

Msg 4864, Level 16, State 1, Procedure usp_LoadASC, Line 138

Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 8, column 6 (ElectionPct).

Msg 4864, Level 16, State 1, Procedure usp_LoadASC, Line 138

Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 9, column 6 (ElectionPct).

Msg 4864, Level 16, State 1, Procedure usp_LoadASC, Line 138

Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 10, column 6 (ElectionPct).

Msg 4864, Level 16, State 1, Procedure usp_LoadASC, Line 138

Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 11, column 6 (ElectionPct).

Msg 4865, Level 16, State 1, Procedure usp_LoadASC, Line 138

Cannot bulk load because the maximum number of errors (10) was exceeded.

Msg 7399, Level 16, State 1, Procedure usp_LoadASC, Line 138

The OLE DB provider "BULK" for linked server "(null)" reported an error. The provider did not give any information about the error.

Msg 7330, Level 16, State 2, Procedure usp_LoadASC, Line 138

Cannot fetch a row from OLE DB provider "BULK" for linked server "(null)".

I have a stored procedure thats loads data into the sql server thru a text file...but i am getting this error since i moved it to sql server 2005 from 2000. Yest i was getting an xp_cmdshell error but when to the configuration and checked the xp_cmdshell and now i am getting this error..

Any help will be appreciated.
Regards
Karen

View 8 Replies View Related

Not Sure What Is The Error And How To Solve It

Dec 17, 2007

Hi,

I am really not sure what is the error and how should I debug it.

I Have 64bit OS installed. On That, 64bit SQL as well as 32 bit SQL server are installed. I am trying to run packages from SQL Job which lanches the SSIS Packages from 32 bit dtexec.
The packages stop running Halfway without any error. That's what the log says.
Same time it creates a sql error Dump.

This is the content of DUMP

Microsoft (R) Windows Debugger Version 6.8.0004.0 X86Copyright (c) Microsoft Corporation. All rights reserved.

Loading Dump File [C:Documents and SettingsXXXDesktopSQLDmpr0093.mdmp]User Mini Dump File: Only registers, stack and portions of memory are availableSymbol search path is: *** Invalid ******************************************************************************** Symbol loading may be unreliable without a symbol search path. ** Use .symfix to have the debugger choose a symbol path. ** After setting your symbol path, use .reload to refresh symbol locations. *****************************************************************************Executable search path is: Windows Server 2003 Version 3790 (Service Pack 1) MP (8 procs) Free x86 compatibleProduct: Server, suite: Enterprise TerminalServer SingleUserTSDebug session time: Mon Dec 17 12:00:34.000 2007 (GMT+6)System Uptime: not availableProcess Uptime: 0 days 0:00:10.000...........................................................................................................................................Loading unloaded module list...This dump file has an exception of interest stored in it.The stored exception information can be accessed via .ecxr.(44ec.774): Access violation - code c0000005 (first/second chance not available)eax=00000000 ebx=7d560760 ecx=0908dfb8 edx=0908eec0 esi=00000338 edi=00000000eip=7d61c824 esp=09fbef3c ebp=09fbefa8 iopl=0 nv up ei pl nz na po nccs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010202Unable to load image C:WINDOWSsystem32tdll.dll, Win32 error 0n2*** WARNING: Unable to verify timestamp for ntdll.dll*** ERROR: Module load completed but symbols could not be loaded for ntdll.dllntdll+0x1c824:7d61c824 c20c00 ret 0Ch

Few days back these packages were running fine with same configuration. Not sure what happend suddenly
and every thing stopped working.

Any viewCommentHelp will be appreaciated

View 4 Replies View Related

Any One Solve The Error Plz....It Is Urgent To Me.

Apr 11, 2008

Hi,

Any one tell me the code to connect to .sdf file in c# windows application?And tell the requirments to conncet.My sdf file path is this

C:\Documents and Settings\koti\My Documents\Example.sdf

I write this code.It is not working(This c# windows application code in button click event)

string str = "Provider=Microsoft.SQLSERVER.MOBILE.OLEDB.3.0;Data Source=C:\Documents and Settings\koti\My Documents\Example.sdf";
SqlCeConnection cn = new SqlCeConnection(str);
cn.Open();

Ant one help me Plz...

Regards,
venkat.

View 1 Replies View Related

How To Solve Origin_datasource_id Error

May 15, 2007

Hi,


I am using SQL DMO SQLSnapshot to create a snapshot of merge replication.
While creating the snapshot, an error is thrown which says "Invalid column name 'origin_datasource_id'.

The source table on which that error is thrown has all required columns + 'rowguid' added by merge publication.

Any ideas how to solve this issue?

The issue happens in SQL Server 2005 EE + SP2.



Regards,

Arun

View 3 Replies View Related

For EACH Loop Error PLEASE SOLVE IT

Aug 14, 2007

i was created one local variable I with string =null
in the collection i was selected the FOLDER (images_ForEach)
int the Fiels Columns i was choosen (*.gif)

i was created the table(TEMPS)

SN varchar(10) Unchecked
SNAME varchar(250) Checked


IN that for each loop i was placed the sql Task controle with the fallowing expression Working Fine

"INSERT INTO TEMPS ( SN,SNAME )
Values ('" + replace(right(@[User::I], 10), ".gif", "") + "','" + @[User::I]+"')"

SN SNAME RECORD COUNT



WTRMRK.GIF C:Images_ForEachE-WTRMRK.GIF ????????????????? LIKE 1
delete.gif C:Images_ForEachicon-delete.gif ????????????????? 2
floppy.gif C:Images_ForEachicon-floppy.gif ????????????????? 3
pencil.gif C:Images_ForEachicon-pencil.gif ????????????????? 4
uccess.gif C:Images_ForEachsmallsuccess.gif ????????????????? 5
raphic.gif C:Images_ForEach agline-graphic.gif ????????????????? 6



Q: i am unable to insert the record count

for example in temp table RCOUNT COLUMN exist like
SN varchar(10) Unchecked
SNAME varchar(250) Checked

RCOUNT NUMERIC(9)

1) is it require to take the local variable with count init32 then what to do
how to increment the values
i tried in Variable mapping it THROWS an Error so please rectify the dought

Regards
Koti

View 4 Replies View Related

How To Solve This Error: 0xC0017004

Aug 17, 2006

hi !

i am executing Sql task with a stored proceedure to get values from Database. Which gets the value correctly. The variable value i am trying to set in the connection string through the Expression.

The variable value is Path of the DTsx file

e.g D:TAHOEAPPSSSISPackagesIntegration Services Packages Ticket.dtsx.

there are around 22 Variables i am setting to the connection string of the DTSX files.

Error: 0xC001401E at DoArchive, Connection manager "ArchiveTicketException.dtsx": The file name "D:TAHOEAPPSSSISPackagesIntegration Services PackagesArchiveTicketException.dtsx " specified in the connection was not valid.

Error: 0xC0017004 at DoArchive: The result of the expression "@[User::TicketExceptionConnSt]" on property "ConnectionString" cannot be written to the property. The expression was evaluated, but cannot be set on the property.

Error: 0xC00220DE at ArchiveTicketException: Error 0x80070003 while loading package file "". The system cannot find the path specified.

task failed: ArchiveTicketException.

i saw this error in http://msdn2.microsoft.com/en-us/library/ms345164(d=robot).aspx







0xC0017003


-1073647613


DTS_E_PROPERTYEXPRESSIONEVAL


The expression "__" on property "__" cannot be evaluated. Modify the expression to be valid.



How can i rectify this



Thanks

jas

View 5 Replies View Related

What This Error Means And How To Solve It!!

Aug 15, 2007



Hi,

I have report server in SharePoint integrated mode and the Reporting services runnign under domain account. which is part of dmain adming group as well.but when i try to connect to http:\localhost
eportserver

it gives me this error:
Reporting Services Error



Report Server has encountered a SharePoint error. (rsSharePointError) Get Online Help

User cannot be found.


SQL Server Reporting Services


and in reporting service log it gives me following information
w3wp!webserver!1!8/15/2007-13:40:01:: e ERROR: Reporting Services error Microsoft.ReportingServices.Diagnostics.Utilities.SharePointException: Report Server has encountered a SharePoint error. ---> Microsoft.SharePoint.SPException: User cannot be found.
at Microsoft.SharePoint.SPUserCollection.GetByID(Int32 id)
at Microsoft.SharePoint.SPWeb.get_Author()
at Microsoft.ReportingServices.SharePoint.Server.Utility.GetSPWebProperties(SPWeb web)
at Microsoft.ReportingServices.SharePoint.Server.SharePointDBInterface.internalFindObjectsNonRecursive(String wssUrl, CatalogItemList& children)
at Microsoft.ReportingServices.SharePoint.Server.SharePointDBInterface.FindObjectsNonRecursive(String wssUrl, CatalogItemList& childList, Security secMgr, IPathTranslator pathTranslator, Boolean appendMyReports)
--- End of inner exception stack trace ---
at Microsoft.ReportingServices.SharePoint.Server.SharePointDBInterface.FindObjectsNonRecursive(String wssUrl, CatalogItemList& childList, Security secMgr, IPathTranslator pathTranslator, Boolean appendMyReports)
at Microsoft.ReportingServices.Library.ListChildrenAction.PerformActionNow()
at Microsoft.ReportingServices.Library.RSSoapAction`1.Execute()
at Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderFolder()
at Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderItem(ItemType itemType)
at Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderPageContent()
at Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderPage()

how can I solve it!!!!!

thanks

View 12 Replies View Related

(urgent) How Can I Solve This Error

Sep 24, 2007



Hi i am trying to implement Multivalue parameter in my report....

So for the Parameter PlanId i have selected multivalue parameter... and the avialable values are from a query...

when i run the report and just check 1 Plan it works fine.. but when i go to check more than one plan.. I get this error

An error has occured duing local report processing.
an error has occured during report processing.
Query exceution failed for data set Statement.
Error converting data type nvarchar to int.

any help will be appreciated.

Regards
Karen

View 19 Replies View Related

My Error When I Run The Package ? How Can I Solve It

Apr 1, 2008

Warning: 0x80019002 at ODS2DMPackage: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (13) 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.

SSIS package "ODS2DMPackage.dtsx" finished: Failure.

View 1 Replies View Related

How To Solve This Error: 0xC0017004

Aug 17, 2006

hi !

Sorry i am posting this again cos my problem is not fixed yet and i set the last reply as answer i don't know if i need to post it again.



i am executing Sql task with a stored proceedure to get values from Database. Which gets the value correctly. The variable value i am trying to set in the connection string through the Expression.

The variable value is Path of the DTsx file

e.g D:TAHOEAPPSSSISPackagesIntegration Services Packages Ticket.dtsx.

there are around 22 Variables i am setting to the connection string of the DTSX files.

Error: 0xC001401E at DoArchive, Connection manager "ArchiveTicketException.dtsx": The file name "D:TAHOEAPPSSSISPackagesIntegration Services PackagesArchiveTicketException.dtsx " specified in the connection was not valid.

Error: 0xC0017004 at DoArchive: The result of the expression "@[User::TicketExceptionConnSt]" on property "ConnectionString" cannot be written to the property. The expression was evaluated, but cannot be set on the property.

Error: 0xC00220DE at ArchiveTicketException: Error 0x80070003 while loading package file "". The system cannot find the path specified.

task failed: ArchiveTicketException.

i saw this error in http://msdn2.microsoft.com/en-us/library/ms345164(d=robot).aspx







0xC0017003


-1073647613


DTS_E_PROPERTYEXPRESSIONEVAL


The expression "__" on property "__" cannot be evaluated. Modify the expression to be valid.



How can i rectify this

I get the saem proble again the path and varaible value if correct

Thanks

jas

View 4 Replies View Related

How To Solve The Deadlock Error During Backup?

Jan 24, 2005

I used veritas to backup MsSQL 2000 database server but I often encounter backup fail error due to the deadlock in the database. May I know how to reduce this problem?

I heard there is a method to control the database deadlock timeout. If we set a lock timeoutvalue, will it reduce the chance of deadlock to happen? Is there any disadvantage of doing that?

If I were not wrong , we can set the lock_timeout value using the syntax "SET LOCK_TIMEOUT milliseconds" Is that true? But Do we have to have to run this command for every database? What is the normal milliseconds value?

View 3 Replies View Related

TERM LLOKUP ERROR (pLEASE SOLVE IT)

Aug 14, 2007

THIS IS THE ONE.TXT FILE
Customer called to complain that the ice maker on her fridge has stopped working model XXYY-3
Door to refrigerator is coming off model XX-1
Ice maker is making a funny noise XXYY-3
Handle on fridge falling off model XXZ-1
Freezer is not getting cold enough XX-1
Ice maker grinding sound fredge XXYY-3
Customer asking how to get the ice maker to work model XXYY-3
Customer complaining about dent in side panel model XXZ-1
Dent in model XXZ-1
Customer wants to exchange because of dent in door model XXZ-1
Handle is wiggling model XXZ-1
Customer happy with us. Best fridge yet!


i created the table term_result(term_id varchar2(50)); ( termid ==xxyy-3 like)

now i want to find the no of times repeat the xxyy-3 posted queries

ERROR :
DT_NTXT OR DT_WSTR TYPES ONLY ALLOWS HERE ERROR I AM GETTING SO


Flat File Source-----------> Data Conversion --------->Term Lookup -------->Oledb data source
one.txt DT_stR I choosen error occur here


SO WHAT IS THE DATA TYPE I HAVE TO GIVE FOR THAT MATCHING LOOKUP

REGARDS
KOTI


View 1 Replies View Related

How To Solve An Error While Converting Nvarchar To Datetime

Apr 8, 2004

HI,
I HAVE BEEN TRYING TO TRANSFORM AN OLD TABLE TO A NEW FORMAT AND CHANGE SOME OF THE DATATYPE FORMATS USED IN THE OLD ONE.
OUT OF WHICH ONE IS A COLUMN CALLED AS FORM_RECEIVE_DATE WHICH HAS NVARCHAR(41) AS DATATYPE IN THE OLD TABLE CREATED BY A PREVIOUS DBA (DON'T KNOW wHY?)

wHILE CONVERTING IT INTO DATATYPE DATETIME , I AM GETTING THIS ERROR :- "Arithmetic overflow error converting expression to data type datetime." i DON'T KNOW WHY

hERE ARE FEW EXAMPLES OF THE DATA CONTAINED IN THE PREVIOUS TABLE :-

05082003
05062003
05142003

COULD YOU PLS TELL ME A WAY TO SOLVE THIS ?

View 4 Replies View Related

In Desperate Need To Solve A Problem - SQL-DMO (ODBC SQLSTATE: 42000) ERROR 156!

Jan 18, 2008

Good morning all. I need some help with a stored proc that is driving me up a wall. It's probably something stairing me right in the face but I can't see it!

I keep getting the following error on the procedure that I'm working on:
SQL-DMO (ODBC SQLSTATE: 42000)
ERROR 156: Incorrect syntax near keyword 'AS'
Must declare the variable '@signid'
Must declare the variable '@signid'


Here's the code:


CREATE PROCEDURE [dbo].[ws_savesignature2db]
@xml as text='',
@image as image='',
@imageformat as varchar(20)='',
@imagename as varchar(40)='',
@imagesize as int=0,
AS
insert into signaturetable
([image], imageformat, imagename, imagesize)
values
(@image, @imageformat,@imagename,@imagesize)

/*
if your XML field datatype is Text or nTEXT, use the code below in Sql Server 2000.
If you use Sql Server 2005, you can use varchar(max) or nvarchar(max) which will be
much easier and you do not need the code.
*/
select @signid = @@IDENTITY
DECLARE @ptrval binary(16)
SELECT @ptrval = TEXTPTR([xml])
FROM ws_signature
WHERE signid= @signid
if @ptrval is not null
WRITETEXT ws_signature.xml @ptrval @xml
GO

Any help you can give would be a life saver!!!!

Thanks in advance.

Jim


View 3 Replies View Related

How To Solve :Error: 0xC0047062 At CTPKPF, DataReader Source [1]: System.NullReferenceException: Object Reference Not Set To An

Apr 7, 2007

hi

i need help to solve following error in ssis package when i aun ::



Error: 0xC0047062 at CTPKPF, DataReader Source [1]: System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.SqlServer.Dts.Pipeline.DataReaderSourceAdapter.PrimeOutput(Int32 outputs, Int32[] outputIDs, PipelineBuffer[] buffers) at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostPrimeOutput(IDTSManagedComponentWrapper90 wrapper, Int32 outputs, Int32[] outputIDs, IDTSBuffer90[] buffers, IntPtr ppBufferWirePacket) Error: 0xC0047038 at CTPKPF, DTS.Pipeline: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component "DataReader Source" (1) returned error code 0x80004003. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure. Error: 0xC0047021 at CTPKPF, DTS.Pipeline: SSIS Error Code DTS_E_THREADFAILED. Thread "SourceThread0" has exited with error code 0xC0047038. There may be error messages posted before this with more information on why the thread has exited. Information: 0x40043008 at CTPKPF, DTS.Pipeline: Post Execute phase is beginning. Information: 0x40043009 at CTPKPF, DTS.Pipeline: Cleanup phase is beginning. Information: 0x4004300B at CTPKPF, DTS.Pipeline: "component "OLE DB Destination" (1993)" wrote 0 rows. Task failed: CTPKPF

View 11 Replies View Related

Exec Pkg Task: Error 0xC0202009 While Preparing To Load The Package. An OLE DB Error Has Occurred. Error Code: 0x%1!8.8X!.

Feb 21, 2007

I cannot execute a package by using Execute Package task.
I supplied sa credentials to connection manager, and it shows the list of Packages on SQL Server but when running the task it says

Error 0xC0202009 while preparing to load the package. An OLE DB error has occurred. Error code: 0x%1!8.8X!.



Any clue ?


Thanks,
Fahad

View 1 Replies View Related

Upgrading From SP1 To SP2 Causes Setup Program To Terminate With MSP Error: 29527 / Error Code 1603

Apr 24, 2007



Trying to update my local developer version of SQL Server 2005 SP1 to SP2. The setup program terminates with the following information dumped from the logs. Not sure if it is related, but I recently installed the SQL Server 2005 Compact Edition (tools, runtime, etc) on the same development machine. It is a little too deep for me to figure out



Darryl



Here are the last few lines of the HotFix.Log



04/24/2007 14:46:48.374 MSP Error: 29527 The setup has encountered an unexpected error in datastore. The action is RestoreSetupParams. The error is : Source File Name: datastorecachedpropertycollection.cpp

Compiler Timestamp: Wed Jun 14 16:27:59 2006

Function Name: CachedPropertyCollection::findProperty

Source Line Number: 138

----------------------------------------------------------

Failed to read property "InstallIds" {"MachineConfiguration", "", "DUTTONDARRYL1"} from cache

Source File Name: datastorecachedpropertycollection.cpp

Compiler Timestamp: Wed Jun 14 16:27:59 2006

Function Name: CachedPropertyCollection:etProperty

Source Line Number: 164

----------------------------------------------------------

Unable to write property into cache: IsClustered

Source File Name: datastoredatastorecacheschema.cpp

Compiler Timestamp: Wed Jun 14 16:28:00 2006

Function Name: DataStoreCacheSchema::writeProperty

Source Line Number: 115

----------------------------------------------------------

Unable

04/24/2007 14:46:48.694 MSP returned 1603: A fatal error occurred during installation.

04/24/2007 14:46:48.790 Registry: Opened registry key "SoftwarePoliciesMicrosoftWindowsInstaller"

04/24/2007 14:46:48.790 Registry: Cannot read registry key value "Debug"

04/24/2007 14:46:48.806 Copy Engine: Error, unable to install MSP file: c:f01fc31fd0988e3807HotFixSQLFilessqlrun_sql.msp

04/24/2007 14:46:48.822 The following exception occurred: Unable to install Windows Installer MSP file Date: 04/24/2007 14:46:48.822 File: depotsqlvaultstablesetupmainl1setupsqlsesqlsedllcopyengine.cpp Line: 800



******************************************************

Now the SQL9_Hotfix_KB921896_sqlrun_sql.msp.log shows this as the last few lines



MSI (s) (A4:38) [14:46:48:630]: Product: Microsoft SQL Server 2005 - Update 'Service Pack 2 for SQL Server Database Services 2005 ENU (KB921896)' could not be installed. Error code 1603. Additional information is available in the log file C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGHotfixSQL9_Hotfix_KB921896_sqlrun_sql.msp.log.

MSI (s) (A4:38) [14:46:48:630]: Note: 1: 1729
MSI (s) (A4:38) [14:46:48:630]: Transforming table Error.

MSI (s) (A4:38) [14:46:48:630]: Note: 1: 2262 2: Error 3: -2147287038
MSI (s) (A4:38) [14:46:48:646]: Transforming table Error.

MSI (s) (A4:38) [14:46:48:646]: Transforming table Error.

MSI (s) (A4:38) [14:46:48:646]: Note: 1: 2262 2: Error 3: -2147287038
MSI (s) (A4:38) [14:46:48:646]: Transforming table Error.

MSI (s) (A4:38) [14:46:48:646]: Note: 1: 2262 2: Error 3: -2147287038
MSI (s) (A4:38) [14:46:48:646]: Transforming table Error.

MSI (s) (A4:38) [14:46:48:646]: Note: 1: 2262 2: Error 3: -2147287038
MSI (s) (A4:38) [14:46:48:646]: Transforming table Error.

MSI (s) (A4:38) [14:46:48:646]: Note: 1: 2262 2: Error 3: -2147287038
MSI (s) (A4:38) [14:46:48:662]: Transforming table Error.

MSI (s) (A4:38) [14:46:48:678]: Transforming table Error.

MSI (s) (A4:38) [14:46:48:678]: Note: 1: 2262 2: Error 3: -2147287038
MSI (s) (A4:38) [14:46:48:678]: Transforming table Error.

MSI (s) (A4:38) [14:46:48:678]: Note: 1: 2262 2: Error 3: -2147287038
MSI (s) (A4:38) [14:46:48:678]: Transforming table Error.

MSI (s) (A4:38) [14:46:48:678]: Note: 1: 2262 2: Error 3: -2147287038
MSI (s) (A4:38) [14:46:48:678]: Product: Microsoft SQL Server 2005 -- Configuration failed.

MSI (s) (A4:38) [14:46:48:678]: Attempting to delete file c:WINDOWSInstaller6749ee3.msp
MSI (s) (A4:38) [14:46:48:678]: Unable to delete the file. LastError = 32
MSI (s) (A4:38) [14:46:48:694]: Cleaning up uninstalled install packages, if any exist
MSI (s) (A4:38) [14:46:48:694]: MainEngineThread is returning 1603
MSI (s) (A4:2C) [14:46:48:694]: Destroying RemoteAPI object.
MSI (s) (A4:04) [14:46:48:694]: Custom Action Manager thread ending.
=== Logging stopped: 4/24/2007 14:46:48 ===
MSI (c) (58:E4) [14:46:48:694]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1
MSI (c) (58:E4) [14:46:48:694]: MainEngineThread is returning 1603
=== Verbose logging stopped: 4/24/2007 14:46:48 ===



*************************************************************

The Summary.txt looks like this



Time: 04/24/2007 14:46:48.854
KB Number: KB921896
Machine: DUTTONDARRYL1
OS Version: Microsoft Windows XP Professional Service Pack 2 (Build 2600)
Package Language: 1033 (ENU)
Package Platform: x86
Package SP Level: 2
Package Version: 3042
Command-line parameters specified:
Cluster Installation: No

**********************************************************************************
Prerequisites Check & Status
SQLSupport: Failed

**********************************************************************************
Products Detected Language Level Patch Level Platform Edition
Database Services (MSSQLSERVER) ENU SP1 2005.090.2047.00 x86 DEVELOPER
Analysis Services (MSSQLSERVER) ENU SP1 2005.090.2047.00 x86 DEVELOPER
Reporting Services (MSSQLSERVER) ENU SP1 9.00.2047.00 x86 DEVELOPER
Notification Services ENU SP1 9.00.2047.00 x86 DEVELOPER
Integration Services ENU SP1 9.00.2047.00 x86 DEVELOPER
SQL Server Native Client ENU 9.00.2047.00 x86
Client Components ENU SP1 9.1.2047 x86 DEVELOPER
MSXML 6.0 Parser ENU 6.00.3890.0 x86
SQLXML4 ENU 9.00.2047.00 x86
Backward Compatibility ENU 8.05.1704 x86
Microsoft SQL Server VSS Writer ENU 9.00.2047.00 x86

**********************************************************************************
Products Disqualified & Reason
Product Reason

**********************************************************************************
Processes Locking Files
Process Name Feature Type User Name PID

**********************************************************************************
Product Installation Status
Product : Database Services (MSSQLSERVER)
Product Version (Previous): 2047
Product Version (Final) :
Status : In Progress
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGHotfixSQL9_Hotfix_KB921896_sqlrun_sql.msp.log
Error Number : 29527



View 8 Replies View Related

Error: The ProcessInput Method On Component OLE DB Destination (513) Failed With Error Code 0xC0202009

Mar 22, 2007

I'm trying to create a simple Data transfermation. I have a flat file that came of a unix server.. it's 177 bytes wide.. thought it was 175, but when I created the flat file connector, I could see some extra characters on the end.



My output is going to be an excel spreadsheet, I only want two columns from the input. I created an oledb jet 4.0 connection. and followed instructions from here :

http://aspalliance.com/889_Extracting_Data_from_a_Flat_File_with_SQL_Server_2005_Integration_Services

to create my datafow.



On my first attempt to dataflow, I ran into unicode errors and had to do this:



ran into a problem with unicode errors. went to the source for the flat file. for the output column in question changed to Unicode string [DT_WSTR].



When I run , here are the errors I get:

[OLE DB Destination [513]] Error: An OLE DB error has occurred. Error code: 0x80040E09. [DTS.Pipeline]

Error: The ProcessInput method on component "OLE DB Destination" (513) failed with error code 0xC0202009. The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.

[DTS.Pipeline] Error: Thread "WorkThread0" has exited with error code 0xC0202009.

[GanchoFileSource [1]] Information: The total number of data rows processed for file "\ammia01dev04D$JCPcpmgancho_venta_20070321.sal" is 19036.

[GanchoFileSource [1]] Error: Setting the end of rowset for the buffer failed with error code 0xC0047020.

[DTS.Pipeline] Error: The PrimeOutput method on component "GanchoFileSource" (1) returned error code 0xC0209017. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.

[DTS.Pipeline] Error: Thread "SourceThread0" has exited with error code 0xC0047038.


View 4 Replies View Related

SQL Server 2005 Startup Error - TDSSNIClient... Error 0x5... Code 0x51

Jul 13, 2006

Hi,My SQL Server 2005 won't start - can anyone provide some help? Thisseems to be the most significant error:- TDSSNIClient initialization failed with error 0x5, status code 0x51.There was some info here, but the reg key described looks okay:- http://blogs.msdn.com/sql_protocols/I am running SQL Server 2005 64-bit Standard Edition. The server inquestion is the first node of an Active/Active Cluster. This firststarted happening while I was trying to add a share as a clusteredresource of the other node (not to this node's resources).I have not yet reinstalled SQL Server 2005 because I am hoping for moreexplanation of the problem and a possible fix.Thanks,Tom

View 1 Replies View Related

Error Handling In MSSQL - If Error During Call Remote Stored Prcedure I Need SQL Code To Continue...

Jul 20, 2005

Hi All,I want to catch the next MSSQL error in my SQL code with following continuecalculationsServer: Msg 17, Level 16, State 1, Line 1SQL Server does not exist or access denied.If REMOTE_SERVER_1 is inaccessible (as in (a) below) the executing of SQLwill not continue with (b) - I need the code in (b) to run despite whetherthe previous exec was successful or not - Any ideas?begin transaction(a) exec REMOTE_SERVER_1...bankinsert '1' , '1' , 1 , 0 , 0(b) print @@errorcommit transactionwhere REMOTE_SERVER_1 is link to server created byEXEC sp_addlinkedserver @server = 'REMOTE_SERVER_1', @srvproduct = '',@provider = 'SQLOLEDB', @datasrc = 'MYCOMP1', @catalog = 'mirror2'EXEC sp_addlinkedsrvlogin @rmtsrvname = 'REMOTE_SERVER_1', .....Exec sp_serveroption 'REMOTE_SERVER_1', 'data access', 'true'Exec sp_serveroption 'REMOTE_SERVER_1', 'rpc', 'true'Exec sp_serveroption 'REMOTE_SERVER_1', 'rpc out', 'true'Exec sp_serveroption 'REMOTE_SERVER_1', 'collation compatible', 'true'Any help will be greatly appreciated

View 1 Replies View Related

SSIS Error: The Connection Does Not Support Enlisting In Distributed Transaction. Error Code: 0x8000FFFF

Feb 29, 2008



Hi all,

can anyone tell me if an oleDb connection (provider is Jet 4.0 to Access database) can be enlisted in a Distributed Transaction?

The goal is to copy data from SqlServer to Access within a transaction.

Pier

View 10 Replies View Related

When I Use SSIS For Extract From OLAP Database, Then The Error Random Occurred,Error Code = 0x80040E05

May 10, 2007



I have tired for this!

When I use SSIS for extract data from ssas, that means,I use mdx query.

then random error occured.



Hope some one can understand my poor English....



And the Error Info show below.






Code Snippet

Error: 0xC0202009 at Data Flow Task - For Individual User Tech Points, OLE DB Source 1 1 [31]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E05.
An OLE DB record is available. Source: "Microsoft OLE DB Provider for Analysis Services 2005" Hresult: 0x00000001 Description: "Error Code = 0x80040E05, External Code = 0x00000000:.".
Error: 0xC004701A at Data Flow Task - For Individual User Tech Points, DTS.Pipeline: component "OLE DB Source 1 1" (31) failed the pre-execute phase and returned error code 0xC0202009.

View 6 Replies View Related

MS SQL Server Maintenance Plan Failed: Error Code 0x534. [SQLSTATE 42000] (Error 15404))

May 3, 2008



hello,

we have changed the name of MS SQL server 2005 from XYZ to ABC using


sp_dropserver <old_name>

GO

sp_addserver <new_name>, local

GO


Now our maitenance plan is getting failed we are not able to execute backup jobs we are getting following error


Date 03.05.2008 16:00:00
Log Job History (ADM_AdminDB_TP_Backup.Subplan_1)

Step ID 0
Server ABC
Job Name ADM_AdminDB_TP_Backup.Subplan_1
Step Name (Job outcome)
Duration 00:00:00
Sql Severity 0
Sql Message ID 0
Operator Emailed
Operator Net sent
Operator Paged
Retries Attempted 0

Message
The job failed. Unable to determine if the owner (XYZSQLServer) of job ADM_AdminDB_TP_Backup.Subplan_1 has server access (reason: Could not obtain information about Windows NT group/user 'XYZSQLServer', error code 0x534. [SQLSTATE 42000] (Error 15404)).

please help us in this issue

View 13 Replies View Related

[ActiveX Script Task] Error: Retrieving The File Name For A Component Failed With Error Code 0x001B6438.

Jul 28, 2006

This error occurs when the ActiveX task tries to execute:

[ActiveX Script Task] Error: Retrieving the file name for a component failed with error code 0x001B6438.

Anybody know how to troubleshoot these errors? I can't find anything on this error code. The same script works in DTS.







View 8 Replies View Related

SQL 2000 Reovery Fails Sometimes. Error Code (Error 3136). How To Make Database Write Mode?

Jan 7, 2008

Hello,

I am applying hourly differential backup to the backup server from production with the following command. This command makes the database on standby server into read only mode.


RESTORE DATABASE ARSYSTEM FROM DISK = 'E:SQL backup from productionsql_full_backup'
WITH MOVE 'arsystem' TO
'd:ardataarsystem.mdf' ,
MOVE 'arsystem_log' TO 'D:ARLOGARsystem' ,
STANDBY = 'E:SQL backup from productionSQL daily diff back up'


Now I want to run a command which will put the database in write mode. I have created a job which would make the datbase Write mode. This job runs successfully sometimes and fails sometimes. I need to ensure that the job always succeeds. When it fails, how do I troubleshoot and what is the possible fix?

Thanks in advance.

The error message is

Cannot apply the backup on device 'E:SQL backup from productionSQL daily diff back up' to database 'ARSYSTEM'. [SQLSTATE 42000] (Error 3136) RESTORE DATABASE is terminating abnormally. [SQLSTATE 42000] (Error 3013). The step failed.


The steps for the job are as follows with the failing step highlighted in bold.


copy /y "\172.31.9.12Remedy BackupackupSQL backupsql_full_backup" "E:SQL backup from productionsql_full_backup"

copy /y "\172.31.9.12Remedy BackupackupSQL backupSQL daily diff back up" "E:SQL backup from productionSQL daily diff back up"

xp_cmdshell 'net stop "bmc remedy action request system server"'

exec rp_kill_db_processes 'ARSYSTEM'

RESTORE DATABASE ARSYSTEM

FROM DISK = 'E:SQL backup from productionsql_full_backup'

WITH

MOVE 'arsystem' TO 'd:ardataarsystem.mdf' ,

MOVE 'arsystem_log' TO 'D:ARLOGARsystem' ,

NORECOVERY


Failing step

RESTORE DATABASE ARSYSTEM

FROM DISK = 'E:SQL backup from productionSQL daily diff back up'

WITH

MOVE 'arsystem' TO 'd:ardataarsystem.mdf' ,

MOVE 'arsystem_log' TO 'D:ARLOGARsystem' ,

RECOVERY



xp_cmdshell 'del /f "E:SQL backup from productionsql_full_backup"'

xp_cmdshell 'del /f "E:SQL backup from productionsql daily diff back up"'

xp_cmdshell 'net start "bmc remedy action request system server"'





I have scheduled the following hourly diffential restore job too which never fails.

RESTORE DATABASE ARSYSTEM FROM DISK = 'E:SQL backup from productionsql_full_backup'
WITH MOVE 'arsystem' TO
'd:ardataarsystem.mdf' ,
MOVE 'arsystem_log' TO 'D:ARLOGARsystem' ,
STANDBY = 'E:SQL backup from productionSQL daily diff back up'
EXEC MASTER..XP_CMDSHELL 'del /f "E:SQL backup from productionSQL daily diff back up"'

View 12 Replies View Related

An Unknown Error Occurred In The WMI Provider. Error Code 8000000A

Dec 20, 2006

Hi,

I just installed SQL Server 2005 on Windows Vista.
I am getting an error "An unknown error occurred in the WMI
provider. Error Code 8000000A" when connecting to a web server. The
reporting services is running. Is there any other installation that is
missing. Please help.

View 4 Replies View Related

Error: SQL Server Does Not Exist Or Access Denied. (Error Code 17).

Mar 22, 2006

Hello everyone.

I am trying to install Project Server, and i'm having issues with sharepoint, and connecting to SQL:

dataserver is running sbs2003 sql2003 and analsys services.

server2 is running server2003 is to be the application server for project.

ProjectDb is the database that i have setup in sql.

username is the account that can control everything as administrer.

in Sharepoint is asks for the database server: <<dataserver>>

SQL Server database name: <<ProjectDb>>

I'm using windoes authentication and then i click ok, and get the error message.



I've also see the error message can not find the SQL Server, and access denied. Under ODBC i have installed the sql server information under System DSN.

Any help would be great.

Thanks

Everett Buel

View 3 Replies View Related

How To Get The Error Message Rather Than The Code Error

Jun 19, 2007

Hi,After sending a request, I would get the possible error message.Not the code @@error, nor the exact content of sysmessages, but themessage like it could be in the log file.TIA,TSalm

View 1 Replies View Related

Code Error Please Help

Aug 18, 2006

my code was working fine but i changed a few things and now i cant figure it out.
the problem is that when i click my edit button none of the items go into the listbox.  i added a label to track th error and i narrowed it done to a smaller ssection.  Please help
 
   //-----------------------------------------------------------------------------
/////////////////////////////////////////////////////////////////////////////////
protected void EditButton1_Click(object sender, EventArgs e)
{
int counter = 0; //counter for inserting into array

bool Validate = checknumberValidation(TextBox1.Text.ToString());
if (Validate == false)
throw new Exception(InvalidCheckNumber + TextBox1.Text);

Label4.Text = GridView1.Rows.Count.ToString(); //--------RETURNS 0-----SHOULD BE NUMBER OF ITEMS----//

//get # of checkboxes and set array size;
int x = 0;
x = SetStringArraySize(); //set x to number of checkboxes that are checked
String[] updateString = new String[x]; //create string array of size x


Label4.Text = GridView1.Rows.Count.ToString(); //--------RETURNS 0-----SHOULD BE NUMBER OF ITEMS----//



//for loop that will insert update statements into array
for (int i = 0; i < GridView1.Rows.Count; i++)
{
GridViewRow row = GridView1.Rows[i];
bool isChecked = ((CheckBox)row.FindControl("UpdateCheckBox1")).Checked;
if (isChecked == true)
{
if (counter == 0)
updateString[counter] = "[batchid] = '" + GridView1.Rows[i].Cells[3].Text + "' AND [loanid] = '" + GridView1.Rows[i].Cells[5].Text + "' AND [historycounter]='" + GridView1.Rows[i].Cells[8].Text + "'";

if (counter > 0)
updateString[counter] = "[batchid] = '" + GridView1.Rows[i].Cells[3].Text + "' AND [loanid] = '" + GridView1.Rows[i].Cells[5].Text + "' AND [historycounter]='" + GridView1.Rows[i].Cells[8].Text + "'";
counter++;
}
}

//Add items to listbox and set listbox to visible.
Panel1.Visible = true;
PanelGridView.Visible = false;
Panel2.Visible = false;
updateCount.Text = updateString.Length.ToString();
updateCheckNumber.Text = TextBox1.Text;

int q = 0;
while (q < updateString.Length)
{
ListBox1.Items.Add(updateString[q]);
q++;
}
//Label1.Text = temp.Length.ToString(); //Test print to label
}

//-----------------------------------------------------------------------------
//COMPLETE
protected int SetStringArraySize()
{
Label4.Text = GridView1.Rows.Count.ToString(); //--------RETURNS 0-----SHOULD BE NUMBER OF ITEMS----//

int count = 0;
for (int i = 0; i < GridView1.Rows.Count; i++)
{
GridViewRow row = GridView1.Rows[i];
bool isChecked = ((CheckBox)row.FindControl("UpdateCheckBox1")).Checked;
if (isChecked == true)
{
count++;
}

}
Label4.Text = GridView1.Rows.Count.ToString(); //--------RETURNS 0-----SHOULD BE NUMBER OF ITEMS----//

return count;
//returns number of checkboxes that are checked
}
/////////////////////////////////////////////////////////////////////////////////
//-----------------------------------------------------------------------------

 

View 4 Replies View Related







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