Re: INSERTing cyrillic characters in Access db via ASP ? by ljb
ljb
Mon Jan 26 07:57:06 CST 2004
To display the value from the database in a text box
Values = Rst.GetRows
For Fld = 0 to ubound(Values,1)
Response.Write "<INPUT TYPE=""TEXT"" NAME=""Desc""
Response.Write "VALUE=""" & HexToString(Values(Fld,0)) & """>"
To prepare to place the text box value into the database
Set Cmd = Server.CreateObject("ADODB.Command")
Cmd.ActiveConnection = Cnn
Cmd.CommandTimeout = execTimeout
Cmd.CommandType = adCmdStoredProc
Cmd.CommandText = "sp_update"
Cmd.Parameters.append Cmd.CreateParameter( _
"@fld", _
adVarChar, _
adParamInput, _
2, _
StringToHex(Request.Form("Desc")))
Cmd.Execute ,,adExecuteNoRecords
"Beast" <beast@rr.com> wrote in message
news:Xns9477A5C058F0Ebeastrrcom@199.45.49.11...
> Beast <chris@peratinos.org> wrote in
> news:Xns947651D994Abeastrrcom@199.45.49.11:
>
> > I am having trouble INSERTing cyrillic characters in an Access db via
> > asp. I can list cyrillic data fine.
> >
> > I have
> >
> > <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
> >
> >
> > for the charset on the page but gibberish is inserted when adding data
> > to db. English can be inserted fine as well.
> >
> > Anyone know a solution ?
> >
> >
> > thanks
> >
>
> Can you tell me how to add this to my code. I have 5 fields to insert and
> update to the db. I don't understand how to use the code you have given
> me. For example, I have fields Title, Author, Description, Format, and
> Publisher. How do I incorporate your code ?
>
> thanks