|
PRINT CONVERT(NUMERIC(18,0), '')
produces Error converting data type varchar to numeric.
However,
PRINT CONVERT(INT, '')
produces 0 without error...
Question: Is there some SQL Server flag for this or will I need to do case statements for every varchar...
Started by Dr. Zim on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
ISNUMERIC doesn't alway.
Then 0 else convert(numeric(18,0),@a) end
Empty string will convert to zero for float and int types "-" and "." and "1.2E3" as a number but this will all fail to convert to decimal.
|
|
Hi all,
I am fairly new to c# and asp.net and am having an issue converting type;
My situation is that I have a search engine that has a textbox for the search text and two radio buttons for the search location ( IE City1 or City2 )
When I recieve the...
Started by Jason on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Here is some code in you can use.
It's already an int.
No need to convert 1 to an int.
Will work.
|
|
Hi, I am writing some XML data to the stringwriter. I want to pass the values in the stringwriter to the database but when I convert it to a string like
StringWriter.GetStringBuilder().ToString() it is converting all the " (double quotes) to \"
So when...
Started by Jebli on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
|
Ask your Facebook Friends
|
I'm implementing a custom date converter in WPF, the idea to be more clever about date entry, a la Outlook (being able to enter "today", etc.) So I've written my own converter, which is working. It formats the user's entry in the format M/d/yy. So for...
Started by Scott O. on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
This would cause the binding to....
Is it possible that the backing data property is only firing PropertyChanged if it actually changes value? You could try firing PropertyChanged whenever the set function is called regardless of whether the value changes .
|
|
Say I have a dataset like
(1, 2, (3, 4), (5, 6), (7, 8, (9, 0)))
I want to convert it to a (semi) flat representation like,
( (1, 2), (1, 2, 3, 4), (1, 2, 5, 6), (1, 2, 7, 8), (1, 2, 7, 8, 9, 0), )
If you use this, (taken from SO)
def flatten(iterable...
Started by uswaretech on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Don't know if that's really the best way of representing... .
How about a using a different "flat" representation, one which can be converted back:
[1, 2, '(', 3, 4, ')', '(', 5, 6, ')', '(', 7, 8, '(', 9, 0, ')', ')']
This will give the example output.
|
|
I have a string, produced from a dictionary. It looks like this:
( { "advanced_info" = ""; "allergy_info" = ""; "appointment_info" = ""; "blood_group" = ddfgrf; bmi = "0. "; city = ""; country = ""; dob = 2010-01-18 16:17:50 +0530; "emergency_info" = ...
Started by goeff27 on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Are you going to convert "1,2,3,4,5" into ("1", "2", "3", "4", "5") ? In that case, use
-[NSString.
|
|
I'm looking for a simple HTML2RTF converter that I can use on my website which is using a *nix like Operating System. I haven't found anything on the internet, and was hoping the SO community would help me.
PS: I don't want to implement this from scratch...
Started by Luca Matteis on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Rendering capabilities and I'm quite sure it will successfully convert a lot that other converters won't.
|
|
I'm currently using abcPDF 7 to convert HTML to PDF. This is done via an ASPX page where I override the Render method.
Doc theDoc = new Doc(); theDoc.SetInfo(0, "License", m_License ); theDoc.HtmlOptions.Paged = true; theDoc.HtmlOptions.Timeout = 1 ; ...
Started by Alexandre Brisebois on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
The answer is using chaining, but the page ....
Subsequent pages can be drawn using the AddImageToChain method."
From here
An example how to use AddImageToChain can be found here
I had this exact same issue .
Only the first page of the document is drawn.
|
|
Hello,
I have some code in .Net to draw some text content using GDI+. I used GraphicsUnit.Point to size the text. It's working wonderfully on-screen, and even if Print it.
I've been asked to make a system that generates a PDF, and I got ComponentOne's...
Started by Cyril Gupta on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Basically the different devices (and as far as GDI+ is concerned, PDF is probably a device) have different DPI values... .
After some Googeling and from what I know from personal experience with GDI+ and String drawing it comes down to DPI (Dots per Inch) .
|
|
I am trying to make this captcha jquery plugin to work. The a certain line of code is executed, the error pops up.
This is the line of code that causes the error :
$(".ajax-fc-" + rand).draggable({ containment: '#ajax-fc-content' });
What I am assuming...
Started by Drahcir on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
I just also have this issue when i use....
As per RaYell's indirect suggestion the problem was i was returning the wrong value in the ajax response .
I have the same issue, and I'm using Google's AJAX lib like you - it might have something to do with that .
|