Data Type Mismatch In Criteria Expression In ASP

Jun 20, 2007

Hi,



I need help in ASP for this error


Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E07)
[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.
/advice generation/testdateprint.asp, line 371





Code is as :


crtdt = #27/04/2007# ' date in DD/MM/YYYY format



and in database its date format is MM/DD/yyyy



set objrs=server.CreateObject("ADODB.Recordset")

set unitrs=server.CreateObject("ADODB.Recordset")

set userrs=server.CreateObject("ADODB.Recordset")



tsql = "SELECT * From advice_register WHERE "

tsql = tsql & " user_id ='" & Session("UserID") & "'"

tsql = tsql & " and fin_year ='" & CStr(Request.QueryString("fin_year")) & "' and "

tsql = tsql & "created_on ='" & (crtdt) &"'"

objrs.Open tsql,objconn, 1,3

View 7 Replies


ADVERTISEMENT

Data Type Mismatch In Criteria Expression, Help~

Feb 20, 2005

Error in Explorer:
Data type mismatch in criteria expression.

Following codings:

Dim lowestPrice As Double
Dim highestPrice As Double

lowestPrice = FormatCurrency(txtLow.Text, 2)
highestPrice = FormatCurrency(txtHigh.Text, 2)

lblLabel.Text = lowestPrice

.
.

"UNION " & _
"SELECT p.ProductID, p.ProductTitle FROM Product p " & _
"WHERE (p.Price > '" & FormatCurrency(lowestPrice, 2) & "' AND p.Price < '" & FormatCurrency(highestPrice, 2) & "') " & _
"ORDER BY p.ProductTitle"

I don't know where the error goes wrong in here.. previously because of the union missing one spacing that resulted in syntax error, after i inserted a space to it.. it shows me Data type mismatch the criteria expression. Is it because in my sql coding i cant use FormatCurrency for ASP.net? please give me a hand.. thank you

Contact me at: ryuichi_ogata86@hotmail.com
ICQ me at: 18750757

View 1 Replies View Related

Data Type Mismatch In Criteria Expression. Please Help

Mar 14, 2008



<% @codepage=950%>
<!-- #include virtual="common/adovbs.inc" -->


<%
sid = "1"
Dim Connect, RS, Query
Set Connect = Server.CreateObject("ADODB.Connection")
Connect.Open "81231888-katiga"
Set RS = Server.CreateObject("ADODB.Recordset")

Query = "SELECT * FROM lunch_other where LOid = '"& sid &"'"

response.write Query

RS.Open Query, Connect, adOpenDynamic, adLockOptimistic

'if rs.eof then

response.write "Testing OK!!"

'Else
response.write trim(rs("LOid"))
response.write trim(rs("LMenu"))

connect.close
end if
%>

Error Result

SELECT * FROM lunch_other where LOid = '1'

Microsoft OLE DB Provider for ODBC Drivers error '80040e07'

[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.

/lunchset/test3.asp, line 16

View 4 Replies View Related

Data Type Mismatch On Criteria

Oct 8, 2007

I have a data flow that is updating an Access database using an OLD DB Command control. I am getting this error and have narrowed it down to a column the Access table called CreateDate. I don't think this is a reserved word, but even surrounding it in [] did not resolve the problem. The column from SQL Server is called order_date and is a datetime and the destination column createdate is a datetime in Access. When I remove this column fromt he insert command, it works fine but when included, it gives the data type mismatch on criteria error. Any ideas?

View 3 Replies View Related

Data Type Mismatch

Oct 26, 2007

I am new to SQL.

I have the following SQL query.

Update TimeSheet SET TotalTime=TimeOut - TimeIn;

The data type for TotalTime required by me is (For example)
2 Days 3 Hrs.

So what should is Do?

At present i am getting output as 'Jan 1 1900 1:00AM' where as i want it to show as 0 days 1 hour.

View 9 Replies View Related

Capturing Data Type Mismatch

Oct 27, 2005

Hi,
Create Table tb_mismatch
(x int)
Create Procedure proc_mismatch
as
begin
insert into tb_mismatch values('s')
if @@error<>0
begin
print ' entered error loop'
end
print 'successfully exited'
end
exec proc_mismatch --executing the proc
Now, when i try to capture the above error its not getting trapped..its directly going to the final end statement.
I have even tried calling subprocedures so that it comes out of the inner procedure and by some means i can move forward in the outer proc,but even that failed.
The proc. is able to capture all the other errors like primary key violation,binary data truncated etc but not the datatype mismatch error (mainly int with varchar...)
any ideas are highly appreciated.
Thanks & regards,
Pavan.

View 8 Replies View Related

Data Type Mismatch -- SSIS

Mar 5, 2007

Hi All,
I am moving some numerical data from SQL server to excel. After the data is moved, i am getting green flag in excel cell to which the data is moved. I have configured the excel column to accept only numbers, but still i am getting green flag in excel cells. When i click the cell i am getting this message "The number in the cell is formatted as text or preceded by a apostrophe"

Can anyone tell me how can i over come the issue.

Thanks
Anwar











View 4 Replies View Related

Sql With C#: Access Database Data Type Mismatch

May 7, 2008

I am trying to delete the row with the minimum date. First I read in the minimum date using:

OleDbCommand myCommand = new OleDbCommand("SELECT MIN(Date) FROM 30_Day_Data", myConnection);

myCommand.ExecuteNonQuery();
OleDbDataReader myReader = myCommand.ExecuteReader();

This then gives me a date in the format "1/2/2008 12:09:33 AM". Since that is the minimum date, I need that row deleted, so I use:

OleDbCommand myDeleteCommand = new OleDbCommand("DELETE FROM 30_Day_Data WHERE Date='" + "myReader().GetValue(0).ToString()" + "'", myConnection);
myDeleteCommand.ExecuteNonQuery();

This gives me an error saying "Data type mismatch in criteria expression". I have no idea how to format the date so that it can get deleted. I have tried nearly everything with no success. Any help is appriciated.

Thanks!
Ross

View 1 Replies View Related

Data Type Mismatch In Oracle Lookup On 64 Bit

Mar 6, 2006

I have SS on 64bit trying to do a lookup to an Oracle 10G db - I'm reading from a SS table and using a column to be part of the 'where' clause on my lookup against a table in oracle - I get Data Type mismatch even though both columns are strings (the input SS column is mapped to a string Derived column which is then mapped to the lookup). If I run on a 32bit machine it works fine. I have a task that can successfully update the Oracle DB table (on 64bit), I just can't get the lookup to work on 64 bit.

Anyone else seen this?



Thanks

View 2 Replies View Related

Error On Custom Data Mining Plugin: Content Type Mismatch

Jan 11, 2007

Good afternoon,

I'm doing a custom clustering plugin for text to pre-process ("clean" the texts), calculate weights, estimate the number of clusters (using the PBM index) and finally, do the actual clustering.

So... I've made each of these modules on C++ and I'm putting them all togheter on the plugin.

My database (MDB file) has only one table, with only two fields within: a key (auto-incremental) and a small text. What I intend to do is to get the text in each test case, store them togheter somewhere and call my classes to cluster these texts.

I'm trying to log the texts in a file (just a test) on the ProcessCase method, in the CaseProcessor class. I've did it with no problems with numerical data.

But when I load the MDB file on the Mining Structures Wizard, it says the content type of the field holding the texts is "Continous" and the data type is "Text". Actually, when I saw it I didn't really mind.

But when I run the mining model it gives me the following error: "Error 1 Error (Data mining): The data type of the Table1.Texto mining structure column must be numeric since it has a continuous content type (Content is set to Continuous or Key Time or Key Sequence). 0 0 "


So... How do I change this content type ? (the content type combobox on the Mining Structures Wizard couldn't the changed)

Can anyone help me on this, please ?

Thanks a lot.

View 6 Replies View Related

Csv File Import: Bulk Insert Data Conversion Error (type Mismatch)

Sep 27, 2004

Hi,

Iam trying to import data from a csv file into my table in SQL Server 2000. My table is called as temp_table and consists of 3 fields.

column datatype
-------- -----------
program nvarchar(20)
description nvarchar(50)
pId int

pId has been set to primary key with auto_increment.

My csv file has 2 columns of data and it looks like follows:

program, description
"prog1", "this is program1"
"prog2", "this is program2"
"prog3", "this is program3"


Now i use BULK INSERT like this

"BULK INSERT ord_programs FROM 'C:datafile.csv' WITH (FIELDTERMINATOR=',', ROWTERMINATOR='', FIRSTROW=2)"

to import data into my table in SQL server and it gives me this error

"Bulk insert data conversion error (type mismatch) for row 2, column 3 (pId)"

I guess i have to use fileformat or something since i dont have anything for pId field in the csv file to make it work...

Please help me out guys and please post a snippet of code if you have.

Thank You.

View 2 Replies View Related

Data Access :: Arithmetic Overflow Error Converting Expression To Data Type Int

Jul 24, 2015

When I execute the below stored procedure I get the error that "Arithmetic overflow error converting expression to data type int".

USE [FileSharing]
GO
/****** Object: StoredProcedure [dbo].[xlaAFSsp_reports] Script Date: 24.07.2015 17:04:10 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

[Code] .....

Msg 8115, Level 16, State 2, Procedure xlaAFSsp_reports, Line 25
Arithmetic overflow error converting expression to data type int.
The statement has been terminated.
(1 row(s) affected)

View 10 Replies View Related

Variable Data Type In An Expression

Jun 7, 2006

Greetings my SSIS friends

I am attempting to create an expression as follows:



"Select * from someTable where someColumn >= " + (dt_str, 25, 1252) @[User::DateTimeVariable]



The problem is that my variable is a Datetime field and when I convert it to string, the string will not execute correctly.



How to solve this problem?

View 3 Replies View Related

Type Mismatch

Nov 28, 2005

I'm not sure why the numbers aren't being used as ints, all the examples I've found says this works...I appreciate any suggestions.products = trim(request.form("products")) response.Write("prods [" & products&"]") produces the output...prods [423,424,174] however, when i try and pass this to sql server 7 from asp, i get the following error (if i use query analyzer it works fine.)
Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
[Microsoft][ODBC SQL Server Driver][SQL Server]Error converting data type varchar to int. cmd.Parameters.Append cmd.CreateParameter("@prods",adVarChar,adParamInput,255,products) conn.open cmd.ActiveConnection=conn cmd.Execute 'ERROR ON THIS LINE, SO HELPFUL!SP:  @prods nvarchar(255) --paramSET @sql=@sql+' WHERE id in ('+@prods+')' --i've tried with the parens and without

View 2 Replies View Related

Type Mismatch Rs In Array

May 6, 2006

I have a problem using 3 tables. The first recordset is my own invention (that means a very simple one). It reads product features from a table:

Set Rsx = Server.CreateObject("ADODB.RecordSet")
sSQL= "SELECT * from prodfeatures"
Rsx.Open sSQL, sDSN, adOpenStatic, adLockReadOnly, adCmdText

'then I read the recordset into arrays like this:

While Not Rsx.eof
i=i+1
mte(i)=Rsx("id")
' every id has a corresponding featurename
mfnavn(mte(i))=Rsx("featurename")
Rsx.movenext
Wend

'this part works very well

Now comes the difficult part that the SQLTeam figured out (this combines an order base with an itemorder base):

Set Rs = Server.CreateObject("ADODB.RecordSet")
sSQL="select oitems.catalogid,oitems.features, sum(oitems.numitems) as SumOfItems from oitems Inner Join Orders On Orders.orderid = oitems.orderid Where Orders.oshippeddate =" & dDate & " AND Orders.orderid <> 1 group by oitems.catalogid,oitems.features"
Rs.Open sSQL, sDSN, adOpenStatic, adLockReadOnly, adCmdText

'Then I write the content of the products with product features - the complexity of the sql is due to a use of many other operations:

While Not Rs.eof
response.write Rs("catalogid") & "features:" & Rs("features") & "Name:" & mfnavn(rs("features"))
Rs.movenext
Wend

The query runs, and starts well, writing 3 lines:

239 features:221 Name:Standard bil max 5m lang og 1,9 m høy
240 features:270 Name:Liggestol (gratis)
240 features:271 Name:C1 Enkeltseng i delt lugar u. bildekk. Kun vask


but it is then aborted with this message:

Microsoft VBScript runtime error '800a000d' Type mismatch: 'Rs(...)'
I know that the problematic part is the array
mfnavn(rs("features"))
...anyone with experience in this?

View 6 Replies View Related

Type Mismatch : Error

Jul 20, 2005

HelloMY SQL Server is causing me this problem :Microsoft VBScript runtime error '800a000d'Type mismatch: 'ident'[color=blue][color=green][color=darkred]>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>[/color][/color][/color]I am getting from the table datingnew the value of the ident field."select max(ident)as test from datingnew"ident = RS2("test")ident = ident + 1The ident value is passed over 2 sites by hidden form value. There I amsimpy trying to insert it again in the same table datingnew.[color=blue][color=green][color=darkred]>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>[/color][/color][/color]query = "INSERT INTO datingnew(ident,....,registerdate)"query = query & " VALUES ('" & ident & "', '" & .... & "', '" &registerdate & "')"there the error message is comeing each time :[color=blue][color=green][color=darkred]>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>[/color][/color][/color]Microsoft VBScript runtime error '800a000d'Type mismatch: 'ident'[color=blue][color=green][color=darkred]>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>[/color][/color][/color]I have tried to change the the type of ident in the table datingnew tointeger , nvarchar, ....Tried to close the recordset each time with db.close, RS. close.Changed the ident field to standard, but also to with and withoutduplication, didnt help so far ...Need helpkind regards ArunMicrosoft VBScript runtime error '800a000d'Type mismatch: 'ident'

View 5 Replies View Related

VBScrip Type Mismatch Error

Jul 23, 2005

I'm getting a type mismatch error on the mid(strRecord,1,1)="H" line. Iused to do this all of the time, but I haven't done any VBScript forawhile, so I'm sure I'm forgetting something.While not objResults.EOFstrRecord=String( 333 ,32 )IF TicketID<>objResults.Fields("ticket").Value thenMid(strRecord,1,1)="H"mid(strRecord,2,5)=objResults.Fields("cust").Value 'custmid(strRecord,7,30)=objResults.Fields("ship1").Value 'ship1mid(strRecord,37,30)=objResults.Fields("ship2").Value 'ship2mid(strRecord,67,30)=objResults.Fields("ship3").Value 'ship3elsemid(strRecord,1,1)="D"END IFobjStream.WriteLine(strRecord)TicketID=objResults.Fields("ticket").ValueobjResults.MovenextWend

View 2 Replies View Related

Error '800a03eb' Type Mismatch

May 11, 2006

Hi, myself palak.

I m working on event organizer website,its running ASP pages on windows 2003 server with SQL server 2000. I have upgraded SP2 for SQL server to SP4 in maintance process.

The problem accur with some ASP pages are

server_errors [server_Errors] GetErrorMessage [serverSERVER version 1.0.0] error '800a03eb' Type mismatch

/server/asp/cmfls/errorconfirmation.asp, line

There may be permission /security issues related with database.help me to troubleshoot my problem.

View 1 Replies View Related

Arithmetic Overflow Error Converting Expression To Data Type Int.

Aug 28, 2002

l'm running this procedure and l get this error. All l'm trying to do is to get the size of the database and its objects and what the size should be so that its sized right. Is there a better way of doing this ?

CREATE PROCEDURE sp_totalsize as

SELECT o.name 'Table', SUM(c.length) 'Record size',
MAX (i.rows) '#of rows',
CONVERT (decimal (10, 4), SUM (c.length * i.rows)/(1024.00 * 1024.00)) 'Approx. size (MB)'

FROM sysobjects o, syscolumns c, sysindexes i
WHERE o.id = c.id
AND o.id = i.id
AND (i.indid = 1 or i.indid = 0)
AND o.type = 'U'
GROUP BY o.name
COMPUTE SUM (CONVERT (decimal (10,4), SUM (c.length * i.rows)/(1024.00 * 1024.00)))


GO




(17 row(s) affected)

Server: Msg 8115, Level 16, State 2, Procedure sp_totalsize, Line 3
Arithmetic overflow error converting expression to data type int.

View 1 Replies View Related

Arithmetic Overflow Error Converting Expression To Data Type Int

Sep 27, 2004

Under certain circumstances I am getting the following error

"Arithmetic overflow error converting expression to data type int"

when running the following code:

SELECT Count(*), Sum(GrossWinAmount)
FROM LGSLog
WHERE
(CurrentDate >= '9/1/2004 8:00:00 AM') And (CurrentDate <= '9/27/2004 7:59:59 AM')

If I remove the "Sum(GrossWinAmount)" from the select, it works fine. I therefore believe that Sum is causing the error. Is there a version of Sum that works with larger variables, such as a BigInt? If not, is there some way to do the equivalent using larger numbers? I need to allow for the possibility of obtaining one month's summary, and sometimes the summary value is apparently too large for Sum to handle.

View 10 Replies View Related

Arithmetic Overflow Error Converting Expression To Data Type Int.

Sep 8, 2006

I've got this error message while generate the output with ASP:

"Microsoft OLE DB Provider for SQL Server (0x80004005)
Arithmetic overflow error converting expression to data type int."

it indicate that the error is related to this line:
"rc1.Movenext"

where rc1 is set as objconn.Execute(sql).

Not all outputs result like this, it happens when it has many relationships with other records, especially with those records which also have many relationships with other records.

Can anyone suggest a solution?
I've tried to increase the size of the database file, but it doesn't work.

View 4 Replies View Related

[rsInvalidExpressionDataType] The Value Expression Used In Field Returned A Data Type That Is Not Valid.

Jan 15, 2007

I got this error for a calculated field that calls a public function of a custom assembly based on the report parameter values. The return type is an array of double.

=code.ovalues.dGetValues(Parameters!Report_Start.Value, Parameters!Report_End.Value, Parameters!Tag.Value, Parameters!Agg.Value)

Does SSRS 2005 supports the type double for a field? Can the data source of a field in a dataset be an array? Is there a way to pass the array to a field by reference and display the values at runtime?

I would appreciate any help since I could not find anything helpful on the internet and Microsoft document!

View 14 Replies View Related

DTS Package Error W/SaveToSQLServer - Type Mismatch

Apr 25, 2000

I am programatically loading a template DTS package that imports a text file to SQL Server. I change the properties (source, destination, ...), SaveAs to a new name, and then SaveToSQLServer. The package itself is good, I can programatically execute it and it works, but when it gets saved to SQL Server someting gets corrupted. When I try to open the package or manually execute it, I get a DTS Package error w/Description: Type mismatch. This problem is not constant. Sometimes dozens of packages can be programatically "Saved as" with not even one being corrupted. Currently, I am unable to get a single one to be successful.

This is a big problem for me because the package gets programatically scheduled to a Job in SQL Agent. I have placed the DTS "save as" creation into a loop that loads it and checks for an error. If the error occurs, it is removed from SQL Server and recreated. My loop is currently running forever instead of for seconds.

Help! What have I done wrong? What can I try?

View 1 Replies View Related

DTS Global Variable Variant Type Mismatch

Nov 19, 2004

I am trying to declare a global variable in a DTS package for passing the recordset to the next stage Active Script . After declaration of the Global Variable and selecting datatype of the variable as OTHER ( Variant ) , when I try to save the DTS Package changes , it throws a Type Mismatch Error .

:confused: Please help me out .

Thanx
Arnie .

View 1 Replies View Related

Type Mismatch Error On Bulk Insert

Oct 13, 2005

I am getting a type mismatch error when I do a bulk insert.---Begin Error Msg---Server: Msg 4864, Level 16, State 1, Line 1Bulk insert data conversion error (type mismatch) for row 1, column 14(STDCOST).---End Error Msg---The STDCOST is set to decimal (28,14) and is a formatted in Access as anumber, single with 14 decimal. I don't know why I would be getting a TypeMismatch error.Any idea?Mike

View 4 Replies View Related

Arithmetic Overflow Error Converting Expression To Data Type Datetime

Sep 20, 2006

Hi all,In the beginning of this month I've build a website with a file-upload-control. When uploading a file, a record (filename, comment, datetime) gets written to a SQLExpress database, and in a gridview a list of the files is shown. On the 7th of September I uploaded some files to my website, and it worked fine. In the database, the datetime-record shows "07/09/2006 11:45". When I try to upload a file today, it gives me the following error: Error: Arithmetic overflow error converting expression to data type datetime. The statement has been terminated.While searching in google, i found it might have something to do with the language settings of my SQLExpress, I've tried changing this, but it didn't help. What I find weird is that it worked fine, and now it doesn't anymore. Here is my code of how I get the current date to put it into the database:1 SqlDataSource2.InsertParameters.Add("DateInput", DateTime.Now.ToString());
Am I doing something wrong, or am I searching for a solution in the wrong place? best regards, Dimitri

View 3 Replies View Related

Arithmetic Overflow Error Converting Expression To Data Type Datetime

Jan 7, 2008

Hi,
I'm having this error with my page, user picks the date -using the AJAX Control Toolkit Calender with the format of ( dd/MM/yyyy ).
It looks like the application current format is MM/dd/yyyy, because it shows the error page if the day is greater than 12,  like: 25/03/2007
What is wrong?
Here is the error page:
Server Error in '/' Application.


Arithmetic overflow error converting expression to data type datetime.The statement has been terminated.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Arithmetic overflow error converting expression to data type datetime.The statement has been terminated.
Any help will be appreciated!

View 3 Replies View Related

T-SQL (SS2K8) :: Arithmetic Overflow Error Converting Expression To Data Type Int

Mar 25, 2015

In my sql statement, I don't have any datatype as INT, when I run it, give me error as 'Arithmetic overflow error converting expression to data type int'.

example :
select column1, 2, 3 .....
from (select sum(float) as column1 , ....)

When I hop my cursor on top of column1, it shows (int,null)

View 4 Replies View Related

Arithmetic Overflow Error Converting Expression To Data Type Datetime

Jun 12, 2014

The following codes give me the error "arithmetic overflow error converting expression to data type datetime" Unfortunately, the datatype of date of this database is still varchar(50)

select date from tbltransaction
where datepart(wk,convert(datetime,date,103)) = 15

View 3 Replies View Related

Arithmetic Overflow Error Converting Expression To Data Type Bigint

Jan 9, 2007

I am attempting to setup a replication from SQL Server 2005 that will be read by SQL Server Compact Edition (beta). I'm having trouble getting the Publication Wizard to create the Publication. Sample table definition that I'm replicating:

USE dbPSMAssist_Development;
CREATE TABLE corporations (
id NUMERIC(19,0) IDENTITY(1964,1) NOT NULL PRIMARY KEY,
idWas NUMERIC(19,0) DEFAULT 0,
logIsActive BIT DEFAULT 1,
vchNmCorp VARCHAR(75) NOT NULL,

vchStrtAddr1 VARCHAR(60) NOT NULL,
vchNmCity VARCHAR(50) NOT NULL,
vchNmState VARCHAR(2) NOT NULL,
vchPostalCode VARCHAR(10) NOT NULL,
vchPhnPrimary VARCHAR(16) NOT NULL,
);
CREATE INDEX ix_corporations_nm ON corporations(vchNmCorp, id);
GO


When the wizard gets to the step where it is creating the publication, I get the following error message:


Arithmetic overflow error converting expression to data type bigint. Changed database context to 'dbPSMAssist_Development'. (Microsoft SQL Server, Error: 8115).

I can find no information on what this error is or why I am receiving the error. Any ideas on how to fix would be appreciated.

Thanks in advance ...

David L. Collison

Any day above ground is a good day.

View 3 Replies View Related

Transact SQL :: Arithmetic Overflow Error Converting Expression To Data Type Int

Oct 16, 2013

this query is running fine in 2008 , but its not working in 2005 below is the error Msg 8115, Level 16, State 2, Line 1 Arithmetic overflow error converting expression to data type int.there is some problem in converting date in cte

with a 
as 
(
SELECT dbname = DB_NAME(database_id) ,
       [DBSize] = CAST( ((SUM(ms.size)* 8) / 1024.0) AS DECIMAL(18,2) ) 
       ,
COALESCE(CONVERT(VARCHAR(12), MAX(bus.backup_finish_date), 101),'01/01/1900') AS LastBackUpTime
FROM   sys.master_files ms
inner join msdb.dbo.backupset bus ON bus.database_name = DB_NAME()

[code]....

View 9 Replies View Related

[rsInvalidExpressionDataType] The Value Expression Used In Image ‘image1’ Returned A Data Type That Is Not Valid.

Aug 17, 2007

[rsInvalidExpressionDataType] The Value expression used in image €˜image1€™ returned a data type that is not valid.

[rsInvalidDatabaseImage] The Value expression for the image €˜image1€™ did not evaluate to an image.

Hi How should i solve this problem

Regards
KAren

View 3 Replies View Related

Arithmetic Overflow Error Converting Expression To Data Type Int When Using Fill From A SqlDataAdapter

Mar 7, 2007

I thought I'd post this quick problem and answer, as I couldn't find the answer when searching for it. 
I tried to call a stored procedure on SQL Server 2000 using the System.Data.SqlClient objects, and was not expecting any unusual issues.  However when I came to call the Fill method I received the error "Arithmetic overflow error converting expression to data type int."
My first checks were the obvious ones of verifying that I'd provided all the correct datatypes and had no unexpected null values, but I found nothing out of order.  The problem turns out to be a difference on the maximum values for integers between C# and SQL Server 2000.  Previously having hit issues with SQL Server integers requiring Long Integer types in VB6, I was aware that these are 32-bit integers, so I was passing in Int32 variables.  The problem was that Int32.MaxValue is not a valid integer for SQL Server.  Seeing as I was providing an abitrary upper value for records-per-page (to fetch all in one page), I was simply able to change this to Int16.MaxValue and will hit no further problems as this is also well beyond any expected range for this parameter.
 If anyone can name off the top of their heads what value should be provided as a maximum integer for SQL Server 2000, this might be a useful addition, but otherwise I hope this spares others some hunting if they also experience this problem.
James Burton

View 1 Replies View Related







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