hi AJ,
here 's the 3 files , 1 form, 1 for inserting the records and 1 for
display in the screen
Form
----------------------------------------------------------------------------
--------------------
<%@ Language=VBScri pt CodePage=936 %>
<%
'mySmartUpload. form("c").value s
'ENCTYPE="multi part/form-data"
%>
<meta http-equiv="content-type" content="text/html; charset=gb2312" >
<form action="test3.a sp" method="post" ENCTYPE="multip art/form-data">
<input type="text" name="c" value="" />
<input type="submit" name="submit" value="submit">
</form>
----------------------------------------------------------------------------
--------------------
Insert data
----------------------------------------------------------------------------
--------------------
<%@ Language=VBScri pt CodePage=936%>
<meta http-equiv="content-type" content="text/html; charset=gb2312" >
<%
'Here I use aspSmartUpload to handle my data; however, it also doesn't work
when I use request object
Set mySmartUpload = Server.CreateOb ject("aspSmartU pload.SmartUplo ad")
mySmartUpload.C odepage = 936
mySmartUpload.U pload()
Set linkptr = CreateObject("A DODB.Connection ")
linkptr.Open "Provider=sqlol edb.1" & _
"Persist Security Info=True;" & _
"Data Source=127.0.0. 1;" & _
"Initial Catalog=test;" & _
"User Id=abc;" & _
"Password=; "
sql = "insert into test (content) values ('" & mySmartUpload.f orm("c") &
"')"
linkptr.Execute sql
Response.Write sql
linkptr.Close
set linkptr = nothing
%>
----------------------------------------------------------------------------
--------------------
Display
----------------------------------------------------------------------------
--------------------
<meta http-equiv="content-type" content="text/html; charset=gb2312" >
<%
Set linkptr = CreateObject("A DODB.Connection ")
' User ID: karin
' Pwd: irasia
linkptr.Open "Provider=sqlol edb.1" & _
"Persist Security Info=True;" & _
"Data Source=127.0.0. 1;" & _
"Initial Catalog=test;" & _
"User Id=abc;" & _
"Password=; "
sql = "select * from test"
Set rs = CreateObject("A DODB.RecordSet" )
rs.CursorType = 3
rs.CursorLocati on = 3
rs.LockType = 3
rs.open sql, linkptr
while not rs.eof
response.write rs.fields("cont ent") & "<br>"
rs.movenext()
wend
rs.close
linkptr.Close
set rs = nothing
set linkptr = nothing
%>
----------------------------------------------------------------------------
--------------------
"Anthony Judd" <ad**********@o ptusnet.com.au> ¼¶¼g©ó¶l¥ó·s»D
:u3************ **@TK2MSFTNGP14 .phx.gbl...
You really need to give the error you are getting and maybe some sample
data you are trying to store.
If you are trying to store characters from another language that English,
does you db have the appropriate nchar
columns?
AJ