hi AJ,
here 's the 3 files , 1 form, 1 for inserting the records and 1 for
display in the screen
Form
----------------------------------------------------------------------------
--------------------
<%@ Language=VBScript CodePage=936 %>
<%
'mySmartUpload.form("c").values
'ENCTYPE="multipart/form-data"
%>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
<form action="test3.asp" method="post" ENCTYPE="multipart/form-data">
<input type="text" name="c" value="" />
<input type="submit" name="submit" value="submit">
</form>
----------------------------------------------------------------------------
--------------------
Insert data
----------------------------------------------------------------------------
--------------------
<%@ Language=VBScript 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.CreateObject("aspSmartUpload.SmartUpload")
mySmartUpload.Codepage = 936
mySmartUpload.Upload()
Set linkptr = CreateObject("ADODB.Connection")
linkptr.Open "Provider=sqloledb.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.form("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("ADODB.Connection")
' User ID: karin
' Pwd: irasia
linkptr.Open "Provider=sqloledb.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("ADODB.RecordSet")
rs.CursorType = 3
rs.CursorLocation = 3
rs.LockType = 3
rs.open sql, linkptr
while not rs.eof
response.write rs.fields("content") & "<br>"
rs.movenext()
wend
rs.close
linkptr.Close
set rs = nothing
set linkptr = nothing
%>
----------------------------------------------------------------------------
--------------------
"Anthony Judd" <ad**********@optusnet.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