.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links


Posted By:      Posted Date: September 07, 2010    Points: 0   Category :Sql Server
Hi Folks, I downloaded SQL 2008 and installed recently.Everything perfectly works except one thing that I can't use VARCHAR AND CHAR data types anymore.I was using SQL 2005 and I had the same problem there as well. Please helpe to solve this problem

View Complete Post

More Related Resource Links

Data Collection in SQL 2008 not working

I am trying to use “Data Collection” feature in SQL 2008. I created it but I am not able to see any report. I am getting blank report. I saw all the jobs related to Data collection are failing and throwing following error:-     The step did not generate any output.  Process Exit Code 4.  The step failed. Any idea what needs to be done? This is SQL Server 2008 64 bits.   Thanks Saumen 

The data types varchar and date are incompatible in the add operator

On the following query I keep getting the error 'The data types varchar and date are incompatible in the add operator'.  As you can see I have tried to convert the date but doesn't seem to work.  The variable @Date1 will start off as a date.  Any suggestions? ' declare @Date1 date declare @SQL1 varchar(2000) set @Date1 = convert(varchar, cast(getdate() as date), 102) set @SQL1 = 'select * from tbl_1 where convert(varchar,cast(tbl_1.Current_dt as date),102) = '+@Date1+'' print @SQL1    LISA86

ADODB & SQL 2008 - working with date data type without pain


Hello, everybody!

Here is a snip:


Dim con As New ADODB.Connection
con.Open "..." ' provider is SQLNCLI10.1

con.Execute "create table tempdb..TestDate([Da] date not null primary key clustered);"

Dim rs As New ADODB.Recordset
rs.Open "select * from tempdb..TestDate"
rs.Fields("Da").Value = DateValue(Now)


It will fail with the following diagnosis: "Conversion failed when converting date and/or time from character string."

I've researched the problem: ADO doesn't recognise server data type 'date' and takes it like an ordinary nvarchar(10). I.e. field type is adVarWChar and DefinedSize = 10. It works well if I do rs!Da = "20101123", however, if I'd like to work with dates by means of strings I would definetelly do that and wouldn't ask any questions moreover, I wouldn't even work

2008 SSIS and NUMA Memory issues and BLOB Data Types


We're running SSIS 2008, moving data from an Oracle 10g database to a SQL 2008 database.  The SSIS is running on the same machine as the SQL Destination server.  The server has 8 gigs and is windows 2003 sp2

The issue we're having is when our package pulls a blob data type from oracle it will just quit with no errors at about 1.4 million records.   We know there are 6 millions records in the dataset. 

A friend of mine said it was a NUMA Memory issue that it is running out at some point and SSIS thinks the incoming data is finished.  Unfortunately, she said there was no answer. 

I was wondering if someone else had a simliar situation moving blobs from Oracle?


(SSIS 2008) What are the precise numerical sizes (in bytes) of the date data types in SSIS?


I have been reading the famous Integration Services: Performance Tuning Techniques document and I want to use the guidance in the Buffer Sizing section.

In order to optimize my settings for DefaultMaxBufferRows and DefaultMaxBufferSize, I need to calculate the Estimated Row Size for my Data Source.

However, when I look to the Integration Services Data Types document I find that several of the data types do not explicitly list their size in bytes.

(DT_BOOL also isn't listed but the assumption must be it's one bit)

Does anyone know how big (in bytes) these data types are? The Estimated Row Size can't be found without them.


Peter Kral

ORDER BY and CASE statement not working with VARCHAR types


Hello all,

I cannot understand why this query won't work for some fields (VARCHAR ones):


	DECLARE @SortExpression as varchar(max) = null	
	SET @SortExpression = 'jobName'
	create table #TempJobHistory(
		[created] [datetime] NOT NULL,
		[clientName] [varchar](50) NOT NULL,	
		[startTime] [datetime] NOT NULL,
		[endTime] [datetime] NULL,			
		[jobName] [varchar](50) NULL,
		[exitCode] [int] NULL,
		[status] [varchar](20) NOT NULL,
		[rowNumber] [bigint] NOT NULL		

	insert into #TempJobHistory

Data Types - Date and Time in SqlServer

Date and time values can be stored with either the DATETIME or SMALLDATETIME data type. The difference between the two is that SMALLDATETIME supports a smaller range of dates and does not give the same level of precision when accounting for time. The DATETIME data type can hold values from January 1st of 1753 to December 31st of 9999. The time is stored to the 1 three hundredths of a second and each value takes up 8 bytes of storage. The SMALLDATETIME data type can hold values between January 1st 1900 and June 6th of 2079. The time is tracked to the minute and each value takes up 4 bytes of storage. The majority of business applications can live happily with SMALLDATETIME, however, if you are in an environment where each second matters or you need to make estimates to the distant future (or past) then you have to resort to DATETIME. If you fail to specify the time when inserting a value into a DATETIME or SMALLDATETIME column, a default of midnight is used. If you fail to specify the date portion the default of January 1, 1900 is used.

Using Conditional Split data Transfer in SSIS 2008

This article uses the Integration Services Conditional Split Data Transformation element to filter and transfer data from a set of flat text files to SQL Server database table. The concept can be easily extended to apply to any other source or destination such as Microsoft Excel. This scenario is useful in creating denormalized database tables in a reporting and analysis situation.

Date and Time Data Types and Functions

The following sections in this topic provide an overview of all Transact-SQL date and time data types and functions. For information and examples that are common to date and time data types and functions

Frequently Asked Questions - SQL Server Data Types

This is good and precise introduction and Frequently Asked Questions - SQL Server Data Types

Not working on Windows Server 2008




I had the CSS friendly adapters working great on our old server (windows server 2003 - 32bit) and now we have moved to a 64 bit environment and now I can not get the CSS friendly adapters to work.

We are using SharePoint 2007.

Is there another work thru for 64bit environment.

I notice windows server 2008 has a directory  C:\Windows\Microsoft.NET\Framework64 would I be using the browser file in this directory???

Please help!

Under The Table: Spatial Data Support In SQL Server 2008


New spatial data support in SQL Server 2008 opens the door to mapping and querying geometric and geographic data, allowing you to build exciting new applications.

Bob Beauchemin

MSDN Magazine February 2009

Hierarchy ID: Model Your Data Hierarchies With SQL Server 2008


Here we explain how the new hierarchyID data type in SQL Server 2008 helps solve some of the problems in modeling and querying hierarchical information.

Kent Tegels

MSDN Magazine September 2008

Error converting data type varchar to numeric.


I create a form to record data using ASP.NET and SQL database...
when i run the project show error "Error converting data type varchar to numeric"

what's the problem actually.i try to change in datatype in database..
but still showing error...




Hello People,

               Well i am just trying to test interoperability between ASP.net And Java web services, wanted to know what are the INTEROPERABILITY issues concering DATA TYPES that are there between the 2?...any thoughts? 

Indexing services on window server 2008 is not working with .net

Hi, I am useing Microsoft indexing services in windows 2008 64 bit .I am getting error like "Exception from HRESULT: 0xC0000005" while i am createing  new catlog from .net 2.0.I am using  "ciodm.dll" for adding new catlog. i am using this code for create new catelog.   Dim Admin As New CIODMLib.AdminIndexServer   Admin.AddCatalog(varContractNo, txtCatelog.Text + "\" + varContractNo) Admin.Stop() Admin.Start() AddScope(txtDocFolderPath.Text, txtSite.Text, txtCatelogname.Text)   Please help me anybody have fixed this issue on window server 2008 64 bit.  

FTP Task working in XP but not working in Windows 7/2008 machines

Hey , A FTP Task in IS pkg is working fine when executed through BIDS in my Win XP machine ..but the same package is not working in Win 7/2008 machine. FTP task fails with the error : [FTP Task] Error: Unable to connect to FTP server using "FTPFolder.TempData.com". Here are few facts about my troubleshooting : 1) From my XP machine... I am able to connect to the FTP Server using DOS Cmds but fails in 2008 machine saying "Unknown host" I did : Run>Cmd>FTP>Open FTPFolder.TempData.com 2) I can view the files on the FTP server through a browser ( URL was given )on both the machines with no issues. 3) I created Port exception for 20 & 21 Ports for 2008 machine ...still no luck. 4) When I PING the FTP server --Cmd>PING FTPFolder.TempData.com On XP Machine...though FTP Server Name is resolved to IP... I still receive "Request timed out." On 2008 Machine ...the IP is not even resolved and error is thrown "Ping request could not find host FTPFolder.TempData.com. Please check the name and try again." 5) I am connecting to FTP Server from my Office machines. I have searched all the threads on this FTP error topic and haven't found the apt thread..so I have opened a new one.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend