I'm getting a SQL Server exception in my C# code with the following message:
The code page 0 is not supported by the server.
I haven't found much searching for that error. What does this mean?
EDIT:
Just in case someone has the same issue, the method that was calling the SQL stored procedure set several parameters. Each of those parameters had the following set
param.CompareInfo = System.Data.SqlTypes.SqlCompareOptions.IgnoreCase
Removing that fixed the issue.
A code page is an ordered set of characters of a given script in which
a numeric index, or code point value, is associated with each
character. A Windows code page is typically referred to as a character
set or charset. Code pages are used to provide support for the
character sets and keyboard layouts that are used by different Windows
system locales.
From here
Trying to add documents to an elasticsearch index using Sense. eg:
POST productmarket/ppt/joe#broker.com_Index_withNewGuid_233df4
{
"hash" : "cake"
}
and I get back"
Request failed to get to the server (status code: 0):
Now if I change the # to something else it works fine.
Now we already have items in the index that have #'s in the id's. If I update them in a frontend APP we have that uses the API's to post it breaks as well eg.
BUT When I use our C# app to index a json document that has # in its id using NEST it works. And when I try and update this document again in the frontend app (where it just broke) it works as well.
Now I have tried indexing plain document and complex documents. Nothing changes. I've tried different indexes. Still the same problem.
Any idea what is wrong?
Figured it out. Pretty stupid.
Nest URL encodes the request.
Sense does not. Using the URL encoded value for # it works fine.
I am a total beginner of ASP.NET. I have created a webform in Visual Studio and now I need to figure out how to make the webform submit the data to a record in SQL. I assume there are thousands of tutorials out there for this but I can't seem to find any. Everything I find seems wildly over-complicated to just simply write data to a record. (or maybe its just my lack of understanding .NET that makes it seem over-complicated.)
I dont need to exchange data, or update live data on a page form the db, I just need to write the data to a record.
Can anyone point me in the right direction?
You could use the scaffolding feature to generate your application.
All you need to do is setup your connection string (pointing to your database) and follow this tutorial (http://www.c-sharpcorner.com/UploadFile/4b0136/getting-started-with-web-forms-scaffolding-in-Asp-Net/).
As simple as this!
Follow this link: http://mrbool.com/inserting-data-into-sql-server-database-using-csharp-and-asp-net/25091
or this link
http://www.c-sharpcorner.com/Blogs/12611/easy-steps-to-insert-data-into-sql-server-using-Asp-NetC-Sharp.aspx
I am writing an application and I am using Entity Framework and MSSQL. I have some cyrillic data(Bulgarian, if that matters) in the database. Problem is when I try to read it from the program I get question marks(?????????) but when I try from SQL Management studio everything shows up fine. Collation is set to Cyrillic_General_CI_AS and I am using nvarchar for the columns I store cyrillic characters in. I need your help. How can I fix this?
I found the solution. It turns out that the data that comes out of the database is perfectly fine. The problem was in the displaying. I was using a console project for testing and it apparently didn't like the cyrillic font. Changing the font of the console fixed my problem.
i am going crazy, i have tried everything, urlencode, html encode, but urlrewriting.net is reading Arabic querystring as ?? charecters
totally appreciate the help
If you have .NET 3.5 SP1 installed, I'd recommend you to switch to System.Web.Routing instead of the UrlRewriting.net library. I've recently switched from UrlRewriting.net to System.Web.Routing myself and routing is so much better thought out and better integrated with the ASP.NET pipeline.
If you have the opportunity to switch, I'd recommend it. If not, please post your UrlRewriting.net configuration file so we can tweak the regular expressions that apparently aren't working. Please post some examples of URIs that don't work too.
Also, what's the values defined in the web.config section:
<system.web>
<globalization requestEncoding="utf-8"
responseEncoding="utf-8"
fileEncoding="utf-8" />
</system.web>
Like in the above example, use UTF-8. Also be sure to encode the characters as UTF-8 in the URI.
What happens when you run the IIS 7 application in "Classic Mode" (might require installation to be an available option)?
After long tedious trials My advise to anyone who is using URL Rewriting with IIS 7 in integrated mode, stop wasting your time and either use MVC routing or forget about Arabic Strings in URL
Try this , it is faster .. and problems free .
"~/News/2008/10/10/newsid/تجربة.aspx"
where newsid is the ID of your article .
Get your title from the database : 'select * from news where id = ' & newsid
It is much faster than : "select * from news where title='"& title &"'"
it seems that i have solved the problem by making sure that both pages, the one that contains the link and the one to parse the query string have UTF-8 Encoding
but now i got another problem
Firefox is displaying the hyper link and the link in address bar correctly
but in IE6 and Ie 7 it is like this
mysite/News/2008/10/10/%D8%AA%D8%AC%D8%B1%D8%A8%D8%A9.aspx
even though IE 6 and 7 are parsing the link fine, but this is ugly, what is the solution please ?
Update: man you wont believe it, i have found the problem it is so strange, it is with IIS 7 Integrated Mode,
try to launch your page from visual studio Dev server and Unicode characters will be parsed just fine, but if you launch the page from IIS 7 it will give you the ???? characters.
hope some body will shade some light here