Login | Register | FAQ
Anonymous

asp database

+ Post a reply

Page 1 of 1


asp database

by priyam » Sat Apr 13, 2013 12:50 pm

hello,
I want to connect database to my html website. I had follow asp tutorial of this site but its not working. pls help me . The code i tried is as follow

<html>
<head>
<title>Enter data into database</title>
</head>
<body>
<%

' Database connection - remember to specify path to your database

Set Conn = Server.CreateObject("ADODB.Connection")
DSN = "DRIVER = {Microsoft Access Driver (*. mdb)}; "
DSN = DSN & "DBQ=" & Server.MapPath("C:\Inetpub\wwwroot\DB1.mdb")

Conn.Open DSN

' The SQL statement is built

strSQL = "INSERT INTO Table1 ("

strSQL = strSQL & "Fname, "
strSQL = strSQL & "Lname) "



strSQL = strSQL & "VALUES("

strSQL = strSQL & "'Krishna', "

strSQL = strSQL & "'Raj')"



' The SQL statement is executed
Conn.Execute (strSQL)

' Close the database connection
Conn.Close
Set Conn = Nothing
%>

<h1>The database is updated!</h1>
</body>
</html>

Last edited by priyam on Mon Apr 22, 2013 6:50 pm, edited 1 time in total.

User avatar

priyam

  • Posts: 3
  • Joined: Tue Apr 09, 2013 12:46 pm

Re: asp database

by XainPro » Mon Apr 15, 2013 9:46 pm

What Error It Give it to you ?
User avatar

XainPro

  • Posts: 2401
  • Joined: Fri Feb 17, 2012 8:10 pm

Re: asp database

by priyam » Mon Apr 22, 2013 7:01 pm

XainPro wrote:What Error It Give it to you ?


m getting the following error: -

Error Type:
Server.MapPath(), ASP 0172 (0x80004005)
The Path parameter for the MapPath method must be a virtual path. A physical path was used.
/demo.asp, line 12


i have my site already hosted and want to provide database support to it. please help..
User avatar

priyam

  • Posts: 3
  • Joined: Tue Apr 09, 2013 12:46 pm

Re: asp database

by XainPro » Tue Apr 23, 2013 9:38 pm

this is complicated i would recommend you to hire a professional asp developer for this task !
User avatar

XainPro

  • Posts: 2401
  • Joined: Fri Feb 17, 2012 8:10 pm

Re: asp database

by phpsingh » Mon Apr 29, 2013 2:35 am

<%
response.write
(Server.MapPath("test.asp") &
"<br>")
response.write
(Server.MapPath("script/
test.asp") & "<br>")
response.write
(Server.MapPath("/script/
test.asp") & "<br>")
response.write
(Server.MapPath("\script") &
"<br>")
response.write
(Server.MapPath("/") &
"<br>")
response.write
(Server.MapPath("\") &
"<br>")
%>
Output:
c:\inetpub\wwwroot\script
\test.asp
c:\inetpub\wwwroot\script
\script\test.asp
c:\inetpub\wwwroot\script
\test.asp
c:\inetpub\wwwroot\script
c:\inetpub\wwwroot
c:\inetpub\wwwroot





yeh you now understand where you done a fatal mistake in your code.

I am too quite newbie in Asp.
User avatar

phpsingh

  • Posts: 21
  • Joined: Fri Nov 09, 2012 6:08 am
--
My Passion Is Only Learning Nothing Else :)

dmikqzje

by GeorgeHarPeale » Tue Aug 29, 2017 12:21 am

https://www.flickr.com/groups/3546207@N ... 639327674/
https://bitbucket.org/snippets/orlandogay1981u6/KKrrbx/

To access This is a conflict between Apple/Yosemite and Adobe Air please contact Adobe/Apple to resolve this issue.
https://bitbucket.org/snippets/luciuswui1985b3/4Ln97A/
https://www.flickr.com/groups/3924965@N ... 731179183/

a person who is making a pirated version of a software will need something in return. Maxwell Systems StreetSmarts.
https://www.flickr.com/groups/3931299@N ... 538703470/
https://www.flickr.com/groups/3554184@N ... 738280743/

If the Neat software doesn't see the scanner, try plugging it into a new port. However, the Windows version of Neat is not capable Jun 1, 2016 Neat retires its legacy desktop cash-register receipt scanning app and the cloud represented a way to merge divergent Mac and Windows Sep 22, 2011 Review: NeatDesk Scanner For Mac “You'll care eventually,” said the NeatDesk For Mac. any other recommended/suitable software for less than the $80 (or more, but better/easier).
https://www.aquaponia.org/showthread.ph ... 6#pid97986
http://dinus.in.ua/forum/viewtopic.php? ... 909#p11909
http://nosarmyofficial.altervista.org/s ... #pid201505
http://mojmacko.sk/viewtopic.php?f=5&t= ... 871#p45871
https://fanopel.eu/showthread.php?tid=22268

http://google.com/q=xcmz8uaa
User avatar

GeorgeHarPeale

  • Posts: 1820
  • Joined: Mon Jul 10, 2017 5:19 pm
  • Location: Iceland


+ Post a reply

Page 1 of 1