Showing posts with label bit. Show all posts
Showing posts with label bit. Show all posts

Friday, March 23, 2012

Pound Sign Problem

Hi

I have come across a bit of problem with my Web Form. I have standard textbox which inserts a value into a SQL 2000 database. However if I put a pound sign anywhere inside the text box and do the insert it disappears when I try and reshow the value.

I have checked the database field to see if it has been inputted but its no where to be seen.

So what has happened to my pound sign? any ideas?

I am using VS.Net 2003.

Thanks in advanceThat is strange. SQL 2000 does not reject the pound sign. Neither does the text box control. I did several tests, cannot seem to produce your problem. Do you do any kind of massage to your input in your code before it is insert into the database table?

Please post your code.|||Hiya

Sorry for the delay in getting back to you, please find below my code. This problem really does have me miffed

Cmd As New SqlCommand

Conn.Open()
With objCmd
.Connection = Conn
.CommandType = CommandType.Text
.CommandText = "INSERT INTO PhoneList (FirstName, Surname) " & _
" VALUES (@.FirstName, @.Surname)"

.Parameters.Clear()
.Parameters.Add("@.FirstName", SqlDbType.VarChar).Value = txtFirstName.Text
.Parameters.Add("@.Surname", SqlDbType.VarChar).Value = txtSurname.Text
.ExecuteNonQuery()
End With
Conn.Close()

Field types in theSQL Server 2000 DB are Varchar's. Just thought could this be one of the rasons for the roblem

Thanks in advance|||I have seen this problem before and I think the DataType on the column needs to beText to store ASCII characters.|||Hi PD

I have changed the data type to Text in my SQL DB but I still get the same problem

It just seems really odd, every other character works including !"$%^&*()

but the £ just does not get stored|||I was sleeping when I read your post, I thought you meant the # sign.

Themonetary data types MONEY and SMALLMONEY can accept many national currency symbols like the British pound, the Euro and others.|||How about if you use NVarChar instead?
Although you shouldn't have to go unicode in order to save the pound sign...

Regards
Fredrik|||Hi Fredrik

I have tried changing it to NvarChar and still didnt have any joy. I have even searched around on teh web and cant seem to find anybody else who has had that problem

Just wondering can anybody else replicate this problem there end?

I dont seem to have any hair left..... i think ive pulled it all out|||OK the only way I can seem to get round the problem is by inputting the HTML equvilant of a £ sign which is £

So when this is rendered it appears as a £

But im sure this cant be a solution.... can it?

I even tried to set validateRequest="false", but did not have any joy|||I am sorry. I thought it was # as well.
I did a test. Cannot re-produce the problem. I am using Varchar for the data field.

Did you try to debug and see whether the pound value was passed in correctly?|||Here is my test code in C#. I just have a textbox at the front end.


conn.Open ();
string strInsert = "Insert Into Chun (Test) Values (@.chun)";
SqlCommand cmd = new SqlCommand (strInsert, conn);
SqlParameter p = new SqlParameter("@.chun",SqlDbType.VarChar,50);
p.Value = txtPound.Text;
p.Direction = ParameterDirection.Input;
cmd.Parameters.Add (p);
cmd.ExecuteNonQuery ();
conn.Close ();

Here is the value I entered in the text box:

£5432

The value is stored and retrieve displayed as it is.|||I have a similar issue when I pass the # as part of a query string! It chops everything off after the pound sign!|||I did eventually manage to solve my pound sign problem, it was a problem with the globalization setting in the web.config.

Try reading the below article and see if it helps

http://www.howtodothings.com/showarticle.asp?article=755

Good luck

Tuesday, March 20, 2012

Post Deployment - Running Pkg With Set Values !!VOID

I was wondering if someone could provide me with a bit info on how to Set Values in the dtexecui?

I have a package that does a T-SQL SELECT query with a @.var, and that @.var needs to be set at runtime, in the Agent Job....

Thanks in advance.

Nevermind, having a slllllowwww moment this morning, need more coffee:)
In case others would like to know:

\Package.Variables[User::VAR_NAME].Properties[Value] : VAR_VALUE|||I've submitted a DCR to get a GUI interface as part of dtexecui that allows you to generate these property pathswithout typing them in yourself. It shouldn't be hard seeing as the same thing already exists in SSIS Designer.
In the meantime, the way to generate these property paths is using the XML configuration file wizard within SSIS Designer.

I'm sure you know this Jason :)

-Jamie|||Is it Feedback. Got a reference I can vote on? Drives me round the twist too.|||

DarrenSQLIS wrote:

Is it Feedback. Got a reference I can vote on? Drives me round the twist too.

Nah. I did it thru betaplace!

Post Deployment - Running Pkg With Set Values

I was wondering if someone could provide me with a bit info on how to Set Values in the dtexecui?

I have a package that does a T-SQL SELECT query with a @.var, and that @.var needs to be set at runtime, in the Agent Job....

Thanks in advance.

Nevermind, having a slllllowwww moment this morning, need more coffee:)
In case others would like to know:

\Package.Variables[User::VAR_NAME].Properties[Value] : VAR_VALUE|||I've submitted a DCR to get a GUI interface as part of dtexecui that allows you to generate these property pathswithout typing them in yourself. It shouldn't be hard seeing as the same thing already exists in SSIS Designer.
In the meantime, the way to generate these property paths is using the XML configuration file wizard within SSIS Designer.

I'm sure you know this Jason :)

-Jamie|||Is it Feedback. Got a reference I can vote on? Drives me round the twist too.|||

DarrenSQLIS wrote:

Is it Feedback. Got a reference I can vote on? Drives me round the twist too.

Nah. I did it thru betaplace!

Wednesday, March 7, 2012

Possible to assign for each CPU a different process within one SQL Server 2005 on a multicore se

Hi all,


is it possible to assign for each CPU a different process within one SQL Server 2005?

I got 2 servers (each 4 CPUs; 64 bit system) which should be able to failover, but on the other hand there are reporting/analysing applications and totally different sharepoint/other applications that should be hosted seperately, each on one physical server.

Thanks a lot for any help!

MarcBey wrote:

Hi all,


is it possible to assign for each CPU a different process within one SQL Server 2005?

I got 2 servers (each 4 CPUs; 64 bit system) which should be able to failover, but on the other hand there are reporting/analysing applications and totally different sharepoint/other applications that should be hosted seperately, each on one physical server.

Thanks a lot for any help!

Within one SQL Server? No not that I am aware of. You can use the affinity mask option to exclude certain CPUs from an entire instance of SQL Serfver, but you can't do it by individual databases within an instance.

|||

Hi,

It is not possible to restrict CPU to work for certain task.

Regards

Sufian

Saturday, February 25, 2012

Possible Bug with HTML Comments for Data Driven Subscription

I have specified a good sized comment that gets displayed in the message
body. It is html, which by the way could be improved as it is a bit
difficult as it all has to be on one line which makes the <pre> tag useless
so I have to replace all spaces with nbsp and all line breaks with <br> (Hint
- wishlist). In either case when I go back and change something else later -
for instance the email address, it replaces the brackets on my tags in the
comment box with < and &rt, thereby messing up my comment and giving me
something that is gobbledy gook as far as the user is concerned. Why does
reporting services mess up my comment when I go back to change something else?
Thanks,
Scott EguiresThis is a known issue. The Asp.Net control encodes the data for us which
causes this problem. There is no real workaround, except to keep you html
in a separate location and cut and paste it in when ready.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"dkangel" <dkangel@.discussions.microsoft.com> wrote in message
news:9EC5C437-196A-4CD9-BA1D-BBBCD10DC100@.microsoft.com...
> I have specified a good sized comment that gets displayed in the message
> body. It is html, which by the way could be improved as it is a bit
> difficult as it all has to be on one line which makes the <pre> tag
useless
> so I have to replace all spaces with nbsp and all line breaks with <br>
(Hint
> - wishlist). In either case when I go back and change something else
later -
> for instance the email address, it replaces the brackets on my tags in the
> comment box with < and &rt, thereby messing up my comment and giving me
> something that is gobbledy gook as far as the user is concerned. Why does
> reporting services mess up my comment when I go back to change something
else?
> Thanks,
> Scott Eguires