Why does a page with many pictures get wider?
export data from asp to .mdb?
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What can I do?
• What to Read?
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Сообщества
• Talxy Chat
• Horoscope
• Online
 
Зарегистрируйся!

QAIX > ASP web-programming > export data from asp to .mdb? 7 March 2006 18:30:27

  Recent blog posts: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Moderators:

export data from asp to .mdb?

Mr Pen 7 March 2006 18:30:27
 Hi

I am currently trying to get a simple data submission asp form to export
data to an access database, this is the code for the contact_insert page

<html>
<head>
<meta http-equiv="Content­-Language" content="en-us">
<meta http-equiv="Content­-Type" content="text/html;­ charset=windows-125­2">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.­Editor.Document">
<meta name="Company" content="Kalptaru Infotech Ltd. [www.a2zhelp.com]">
<title>This page was generated using ASP Helper [www.a2zhelp.com]</t­itle>
<style>
<!--
td { font-family: Tahoma; font-size: 8pt; background-color:
#E6F2FF;
border-style: solid; border-width: 1 }
th { font-family: Tahoma; font-size: 8pt; font-weight: bold;
background-color:
#E6E6E6; border: 1px outset #FF9900; }
input { font-family: Tahoma; font-size: 8pt; border: 1px inset
#E6E6E6; }
table { }
-->
</style>
</head>
<body>
<table border="0" cellpadding="2" width="100%">
<tr>
<td colspan="3" width="100%">Adding­ data to the database</td>
</tr>
<tr>
<td width="10%"></td>
<td width="80%">
<%const DATABASE_NAME="bigb­rother.mdb"
dim Con
set Con=server.createob­ject("ADODB.Connecti­on")
Con.open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ="&
server.mappath(DATA­BASE_NAME) & ";User Id=Admin;Password="­
%>

<%'-------Getting Name
dim Name
Name=Request("Name"­)
Name=Replace(Name,"­'","''")%>
<%if trim(Name)="" then
bHasError=true
sErrMessage=sErrMes­sage & "<LI> Name cannot be empty."
end if%>
<%'-------Getting Email
dim Email
Email=Request("Emai­l")
Email=Replace(Email­,"'","''")%>
<%if trim(Email)="" then
bHasError=true
sErrMessage=sErrMes­sage & "<LI> Email cannot be empty."
end if%>
<%'-------Getting Query
dim Query
Query=Request("Quer­y")
Query=Replace(Query­,"'","''")%>
<%if trim(Query)="" then
bHasError=true
sErrMessage=sErrMes­sage & "<LI> Query cannot be empty."
end if%>
<%if bHasError then%>
<table><tr><td colspan="2" align="center"
width=100%><%Respon­se.Write("Sorry we cannot proceed because of the following
errors") %></td></tr>
<tr><td colspan=2 width=100%><%respon­se.write
sErrMessage%></td><­/tr></table>
<%else%>
<%Dim sSQL
sSQL ="insert into [Contact]([Name],[Email],[Query]) values( " & "'" & Name
& "','"&Email&"','"&Q­uery&"')"
con.Execute sSQL
%>
Congratulations!!! Database was successfully updated.
<%End if
%></td>
<td width="10%"></td>
</tr>
<tr>
<td colspan="3" width="100%" bgcolor="#FF9900">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td bgcolor="#E6E6E6">
<p align="center"><fon­t face="Tahoma" size="1"
color="#0000FF"><br­>
This
page was automatically generated using Kalptaru Infotech Ltd's ASP
Helper, <br>
the automatic ASP Code generation software.<br>
For more information on how to improve the efficiency and speed of
your ASP Programming and to know more about ASP Helper visit <a
href="http://www.a2­zhelp.com">www.a2zhe­lp.com</a>
or send an email to <a
href="mailto:asphel­per@a2zhelp.com">asp­helper@a2zhelp.com<b­r>
</a>
</font></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

and this is the error message i get:

Technical Information (for support personnel)

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable
query.
/contact_insert.asp­, line 65


Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)

Page:
POST 81 bytes to /contact_insert.asp­

POST Data:
Name=paul&Email=pen­@hotmail.com&Query=h­ow+much+is+that+reco­rd+in+the+window%3F.­..

Time:
07 March 2006, 15:11:00

any help would be gratefully appreciated

paul
Add comment
 

Add new comment

As:
Login:  Password:  
 
 
  
 
Пожалуйста, относитесь к собеседникам уважительно, не используйте нецензурные слова, не злоупотребляйте заглавными буквами, не публикуйте рекламу и объявления о купле/продаже, а также материалы нарушающие сетевой этикет или УК РФ.


QAIX > ASP web-programming > export data from asp to .mdb? 7 March 2006 18:30:27

see also:
[News & Announcements] - service outage…
[Security & JAAS/JBoss] - J2EE…
[JBoss Portal] - cms portlet and…
пройди тесты:
see also:
I think, I mustn't change my blog.....
dvdsanta
Presentation

  Copyright © 2001—2008 QAIX
Idea: Miсhael Monashev
Помощь и задать вопросы можно в сообществе support.qaix.com.
Сообщения об ошибках оставляем в сообществе bugs.qaix.com.
Предложения и комментарии пишем в сообществе suggest.qaix.com.
Информация для родителей.
Write us at:
If you would like to report an abuse of our service, such as a spam message, please .