473,770 Members | 1,779 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C# to ASP to ACCESS having Charest conversion difficulties


Hi,
I am still having Charest conversion
difficulties s when passing string from C# TO ASP and than to access using
ADO
I am using HttpWebRequest to POST some Multilanguage(H ebrew and English)
to an ASP page which in turn uses ADO to save them to an access data base
the access data base support(as I underatdn( UNICODE strings),I can insert
Hebrew string fro access IDE)
Here is the code which create the POST request

//Executing POST command

string strPost=string. Format(
"GUID={0}"+
"&UserPassword= {1}"+
"&Email1Address ={2}"+
"&Email2Address ={3}"+
"&Department={4 }"+
"&FirstName={5} ",
Guid,
UserPassword,
Email1Address,
Email2Address,
HttpUtility.Url Encode(Departme nt),
HttpUtility.Url Encode(FirstNam e))

HttpWebRequest objRequest = (HttpWebRequest )WebRequest.Cre ate(url);
objRequest.Meth od = "POST";
byte[] data = Encoding.UTF8.G etBytes(strPost );
objRequest.Cont entLength = data.Length;
objRequest.Cont entType = "applicatio n/x-www-form-urlencoded";
try
{

System.IO.Strea m stream=objReque st.GetRequestSt ream();
stream.Write(da ta,0,data.Lengt h);
stream.Close();
}
catch(Exception e)
{
Console.Write(e .Message);
return false;
}

HttpWebResponse objResponse = (HttpWebRespons e)objRequest.Ge tResponse();
using (StreamReader sr = new StreamReader(ob jResponse.GetRe sponseStream()) )
{
result = sr.ReadToEnd();
sr.Close();
}
return result.ToLower( ).IndexOf("true ")!=-1;
}

and here is the ASP code which save the data the the data base

///The ASP which process the request

<%@ Language=VBScri pt %>
<%Option explicit
Response.Buffer =TRUE%>
<object RUNAT="server" PROGID="ADODB.R ecordset" id="rs"></object>
<object RUNAT="server" PROGID="ADODB.C onnection" id="conn"></object>
<%
Response.AddHea der "pragma","n o-cache"
Response.AddHea der "cache-control","priva te"
Response.CacheC ontrol = "no-cache"

//Just create the SQL UPDATE query

SqlString="upda te Graduates set "
for each i in Request.Form
SqlString = SqlString & i & " = " & RemoveNullNumbe r(Request.Form( i),0) &
","
next
SqlString= mid(SqlString,1 ,len(SqlString)-1)
SqlString=SqlSt ring & " where [Password]= '" & Request.Form("G UID") & "'"
conn.Execute SqlString,rsAff ected
conn.Close
if rsAffected=0 then
Response.Write SqlString
else
Response.Write "True"
end if
Response.End
%>
When display the result in a web page i see gibberish for records which was
entered using the ASP page
and Hebrew for records which entered using access IDE

I tried several encoders with no luck.

Thanks in advance for any help
Nov 17 '05 #1
0 1215

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
7426
by: John Phelan | last post by:
I read an article by, by Mike Groh, in Access-VB-SQL Advisor Magazine, Week 37 that concerns me quite a bit on distributing Access Applications commercially. First I need to describe a "commercial version" of my application that I hope to distribute after completing all the beta testing: A. It was developed using MS AccessXP Pro (developers edition), B. It has a front end MyApplication.mdb and a MyAppBbackend_be.mde; the front end is...
2
2335
by: Jeff | last post by:
Does anyone know of any potential problems running a 2000 database with 2003? Also, what about installing all other Office products as 2003 versions but leaving Access as 2002 running a 2000 database? Why you ask! A client has a 2000 database. Currently using 2000 runtime for most employees to work with database. A couple use 2003 to use database, no problems. They have a mix of versions of other products such as Word, Excel - 97,...
1
6800
by: ghero180 | last post by:
I am having great difficulties trying to import rich text files to Access. I am using Visual Basic 6. My problem is that the code I am using will read some of the file perfectly, but then skip other parts. I don't know what I am doing wrong but if anybody can point me towards the right direction I would really appreciate it. I posted samples of the rtf and the section of the program that I am having problems with at...
35
3226
by: deko | last post by:
Do I get more scalability if I split my database? The way I calculate things now, I'll be lucky to get 100,000 records in my Access 2003 mdb. Here some math: Max mdb/mde size = 2000 x 1024 = 2,048,000k Let's say on average each record in the database consumes 15k 2,048,000/15 = 136,533 records
34
2613
by: Mathieu Trentesaux | last post by:
Hello I downloaded Office 2007 for this reason : It seems, once again, that it is impossible to save any modification done in a VBA library, from the main project in Access. The save button remains desperatly grayed. It also seems impossible to open the library in another Access instance
5
3618
by: Anns via AccessMonster.com | last post by:
My establishment has about 20 ms access db's that will be converted over (see subject). When we pull all the BE's over to SQL and the FE's on Sharepoint (.net) surely we don't have to change every user face, we should be able to use the same FE in as before as now on Sharepoint? ANSWER:
8
1868
by: reema via AccessMonster.com | last post by:
Did any one faces any difficulties ,issuess or problems using Microsoft Access -- Message posted via http://www.accessmonster.com
64
4602
by: John | last post by:
Hello there, Im cursing my place of employment...and its taken me a month to realise it... The scenario: Ive just stepped into a role to migrate an access database to VB.Net. The access database runs on terminal services and supports approximatly 25-30 users. It is crapping out big time, corrupted data, changes to the front end are difficult for someone unfamiliar with the system (me), the table structure is bad...really bad....there is...
3
3973
by: prakashwadhwani | last post by:
I have just been asked to port an Access 97 app from an old Pentium 3 to a new Pentium Core-2-Duo PC. On the new PC, Office 2003 is installed. On opening the database, Access provided me with an option to convert the database which I did. However, there are a couple of small issues. For one, there were a couple of conversion errors which it stored in a conversion errors table (saying it could not find the field "description").
0
9617
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10099
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10037
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9904
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8931
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7456
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6710
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.