Showing posts with label date. Show all posts
Showing posts with label date. Show all posts

Monday, March 26, 2012

Error Passing Paramater

Hello Babu,

I am trying to open a crystal report from VB. Everything works fine.
When I am trying to assign a date parameter value, I get the error "Type Mismatch".

ie. txtdate="14/06/2004"
Report.ParameterFields(1).AddCurrentValue txtdate

where txtdate is a date variable.

I also tried cdate(txtdate)

when I try to pass variables other than type date it works fine.

Regards ,
SatishHi,

I passed a value from a DTPicker control. It works fine. Check the datatype which you have set while parameter creation. It'll work.

And try DTPicker. I used the same code as yours.

Report.ParameterFields(1).AddCurrentValue DTP1.Value

Regards,
harmonycitra|||Hi,
When passing the date make sure that the date is of the format of the system date.

Madhivanan

Friday, March 23, 2012

Error on SQL server

Hello all i've just had this error on our SQL server:

Event:

Type: Error

Date: 24/05/2007

Category: Logon

User: N/A

Source: MSSQLSERVER

Computer: server name

Time: 12:24:53

In Work Hours: Yes

Security Category: Critical

Internal Event ID:

Scanned Computer: server name

Rule Name: SQL Server errors

Description ID: Length specified in network packet payload did not match number of bytes read; the connection has been closed. Please contact the vendor of the client library. [CLIENT: my i.p address]

Any ideas what it means?

Thanks in advance

Matt Smith

See this related http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=481967&SiteID=1 post here.

Monday, March 19, 2012

Error on Date Data During Insert

Hi Folx,
I am new to SQL Server and I am struggling with source data for a table with two db_datetime columns. The data can be inserted using native SQL, but errors when I build a Data Flow Container.

Versions:
Microsoft SQL Server Integration Services Designer
Version 9.00.1399.00

Microsoft SQL Server Management Studio
9.00.1399.00

Error:
[Flat File Source [1]] Error: The "output column "extraction_date" (24)" failed because error code 0xC0209084 occurred, and the error row disposition on "output column "extraction_date" (24)" specifies failure on error. An error occurred on the specified object of the specified component.

Source Row:

101|100|2006/12/19 23:50:01.00|2006/12/19 23:50:01.00|||

How I got here (in approximate order...):

    Using ETL I created a Container in which I created a PackageCreated a Flat File ConnectionCreated a Flat File SourceEdited the columns on the Flat File Connection
      database timestamp [DT_DBTIMESTAMP]NOTE: corresponding columns on destination table in SQL Server Management Studio are of type datetime
    Created an OLE DB DestinationExecuted the package which returned the above named error.
I mucked about with data types, Derived Columns, Data Conversion, etc and Googled for solutions without success. One of the errors (which I could not duplicate...) I noticed during my "experimentation" was an out-of-memory condtion.

Questions:
01. What is the proper format for my source data?
02. Could this be a memory issue? If so, how do I diagnose it?

In advance, thanks for your help.

Bill

ps: be kind to me...not only am i an old guy, but i'm a unix guy too...

Native SQL that works:

insert into "transaction"
(transaction_id,
org_id,
extraction_date,
create_date,
transaction_size,
profile_count,
version_count)
values
(101,100,
'2006/12/19 23:50:01',
'2006/12/19 23:50:01',
NULL,
NULL,
NULL)Are you sure the flat file source is mapped correctly, with correct lengths, and with a date/time format correct for DB_DBTIMESTAMP?

There should be other errors right next to the one you posted... Can you grab those as well?

Phil|||I also wonder if it's a locale issue within SSIS, or something... That is with respect to the leading year on your DT_DBTIMESTAMP column. Just throwing that out there.|||All the error messages:

[Flat File Source [1]] Error: Data conversion failed. The data conversion for column "extraction_date" returned status value 2 and status text "The value could not be converted because of a potential loss of data.".

NOTE: OutputColumnWidth is zero and "grayed out" in the Flat File Connection Manager Editor

[Flat File Source [1]] Error: The "output column "extraction_date" (24)" failed because error code 0xC0209084 occurred, and the error row disposition on "output column "extraction_date" (24)" specifies failure on error. An error occurred on the specified object of the specified component.

[Flat File Source [1]] Error: An error occurred while processing file "C:\work\CAPS\SQL\UNL\unloader\cont100.txt" on data row 1.

[DTS.Pipeline] Error: The PrimeOutput method on component "Flat File Source" (1) returned error code 0xC0202092. 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.

[DTS.Pipeline] Error: Thread "WorkThread0" received a shutdown signal and is terminating. The user requested a shutdown, or an error in another thread is causing the pipeline to shutdown.

[DTS.Pipeline] Error: Thread "WorkThread0" has exited with error code 0xC0047039.|||
Locale ID is English (United States)|||Have you redirected your error output to a data viewer to be able to inspect the error row(s)?

Have you previewed the data in the flat file connection? Does it all look correct? Can you post a sample row of data?|||
Well Phil, thought I was going to be slick and redirect to a data viewer, but I don't know what I did wrong because now my package done disappeared on me...in other words, the structure no longer shows in the "Solution Explorer". I can see my Control Flow, Data Flow, and Connection Managers, but don't know how to now display/execute the package!

Before that happened, I did open the Flat File Connection Manager Editor and the data looked correct when I selected "Columns" and "Preview".

I will reconstruct after lunch...and if you would like to take this discussion offline, you can send e-mail to tampa_dba@.yahoo.com. If / when this gets resolved, then we can post the solution...

|||The solution explorer is buggy at best.

Find the physical package, and move it to another folder... Then, in solution explorer, you can add existing package. Select the moved package, and you'll be all set again. You'll then be able to delete the "moved" file.|||
Okay, it's back. Is this what you want?

101|100|2006/12/19 23:50:01.00|2006/12/19 23:50:01.00|||

'Name''Data Type''Precision''Scale''Length''Code Page''Sort Key Position''Comparison Flags''Source Component'
'transaction_id''DT_I4''0''0''0''0''0''''Flat File Source'
'org_id''DT_I4''0''0''0''0''0''''Flat File Source'
'extraction_date''DT_DBTIMESTAMP''0''0''0''0''0''''Flat File Source'
'create_date''DT_DBTIMESTAMP''0''0''0''0''0''''Flat File Source'
'transaction_size''DT_I4''0''0''0''0''0''''Flat File Source'
'profile_count''DT_I4''0''0''0''0''0''''Flat File Source'
'version_count''DT_I4''0''0''0''0''0''''Flat File Source'|||SSIS does not like the fraction in your timestamp column. If I drop that, the package works fine. Now I'm trying to figure out why.|||
thanks for your help. dropping the fractional worked. i don't like that it worked because the datatype should support fractional time, but it is not a requirement.

Error on CONVERT(Datetime,'2000-01-01')

Hello,

We have several stored procedure which convert literal strings to date in the format off: CONVERT(Datetime,'2000-01-01') or such.
Those procedures are working well on our development server as well as on several other servers we installed at our customers.
However, on an MSSQL server that was install in Germany, we get an error on those convert line. The error the MSSQL return is: "Bei der Konvertierung eines char-Datentyps in einen datetime-Datentyp liegt der datetime-Wert au?erhalb des gültigen Bereichs." which more or less translate too:
"During the conversion of a char data type into a DATE time data type lies DATE-TIME-WORTH outside of the valid range."

I managed to manually fix this by changing the convert line to the following: CONVERT(Datetime,'20000101') , but I still have few questions:

1. I would be happy to know what is the reason for the inconsistent behavior of the CONVERT(Datetime,'2000-01-01') and if there is a way to solve it without changing the stored procedure (maybe configuring something in the MSSQL setting or regional setting of the server itself).

2. Can I be assured that the CONVERT(Datetime,'20000101') will work properly on each and every instance of MSSQL, or can this format might also fail on different machines.

Thanks in advance.

Run this in Query Analyzer

SELECT CONVERT(Datetime,'2000-12-13')

SET DATEFORMAT dmy
SELECT CONVERT(Datetime,'2000-12-13')

The second one will fail because SQL server expects a date in yyyyddmm format, un Europe they use the ddmmyyyy format

Lookup SET DATEFORMAT in BOL

Denis the SQL Menace

http://sqlservercode.blogspot.com/

|||

Forgot to answer you question ;-(

YYYYMMDD (no dashes) is the safe ISO dateformat to use

Denis the SQL Menace

http://sqlservercode.blogspot.com/

Wednesday, February 15, 2012

Error Message

Can anyone shed any light on the following error message
Event Type: Information
Event Source: MSSQLSERVER
Event Category: (2)
Event ID: 17055
Date: 01/07/2003
Time: 17:30:59
User: N/A
Computer: XXXXXX1
Description:
17148 :
SQL Server is terminating due to 'stop' request from
Service Control Manager.
Thanks
PeterHello, Peter!
This, AFAIK, is SQL Server telling you it has been told to shut down. The
Event Type is Information. I do not think there is anything to worry about
from a SLQ Server point of view. You may however want to know who and why
your server is shutting down.<grin>
--
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org
: Event Type: Information
: Event Source: MSSQLSERVER
: Event Category: (2)
: Event ID: 17055
: Date: 01/07/2003
: Time: 17:30:59
: User: N/A
: Computer: XXXXXX1
: Description:
: 17148 :
: SQL Server is terminating due to 'stop' request from
: Service Control Manager.
-- Microsoft CDO for Windows 2000|||Thanks Allan, as you said I will just have to figure out
why.
Peter
>--Original Message--
>Hello, Peter!
>This, AFAIK, is SQL Server telling you it has been told
to shut down. The
>Event Type is Information. I do not think there is
anything to worry about
>from a SLQ Server point of view. You may however want to
know who and why
>your server is shutting down.<grin>
>--
>Allan Mitchell (Microsoft SQL Server MVP)
>MCSE,MCDBA
>www.SQLDTS.com
>I support PASS - the definitive, global community
>for SQL Server professionals - http://www.sqlpass.org
>: Event Type: Information
>: Event Source: MSSQLSERVER
>: Event Category: (2)
>: Event ID: 17055
>: Date: 01/07/2003
>: Time: 17:30:59
>: User: N/A
>: Computer: XXXXXX1
>: Description:
>: 17148 :
>: SQL Server is terminating due to 'stop' request from
>: Service Control Manager.
> -- Microsoft CDO for Windows 2000
>
>.
>

Error message

Does anyone know the meaning of this error message?
Event Type: Warning
Event Source: MSSQLServer
Event Category: (8)
Event ID: 19011
Date: 4/27/2007
Time: 10:21:33 PM
User: N/A
Computer:
Description:
SuperSocket info: (SpnRegister) : Error -2146893006.
Thank you.Hi
"GoFishing" wrote:
> Does anyone know the meaning of this error message?
> Event Type: Warning
> Event Source: MSSQLServer
> Event Category: (8)
> Event ID: 19011
> Date: 4/27/2007
> Time: 10:21:33 PM
> User: N/A
> Computer:
> Description:
> SuperSocket info: (SpnRegister) : Error -2146893006.
>
> Thank you.
>
Have you seen http://tinyurl.com/25uyv7
John