Home | Advertising Info4 USERS CURRENTLY ONLINE   
PowerASP
   Site Search Contact Us Friday, April 19, 2024  

  Active InfoActive Info  Display List of Info MembersMemberlist  Search The InfoSearch  HelpHelp
  RegisterRegister  LoginLogin
Classic ASP - Database Issues
 PowerASP Code Help Area : Classic ASP - Database Issues
Subject Info: problem with my asp script A d d  -  P o s tAdd P o s t
Author
Message << Prev Info | Next Info >>
david chong
Newbie
Newbie


Joined: May/17/2006
Online Status: Offline
Info: 2
Added: May/17/2006 at 7:32am | IP Logged Quote david chong

hi, im a newbie to asp and i have a problem with my form processing script.  I think i have everything else correct but i think there is a problem with the:

Set objCct=Server.MapPath("/blah/blah.mdb")

The problem is i have an internal server problem...I would if appreciate it if sum1 could help me out cos wat i put there used to work but now it doesn't because the hosting company just got bought or sumthing.  Pls help!!!!!!

Back to Top View david chong's Profile Search for other info by david chong
 
firas_TheGeek
Newbie
Newbie
Avatar

Joined: May/27/2006
Location: Oman
Online Status: Offline
Info: 28
Added: May/27/2006 at 7:43am | IP Logged Quote firas_TheGeek

Hi,

the best way to connect to the database is by the following code

 

set objCct=server.CreateObject("ADODB.Connection")

objCct.ConnectionString ="Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & Server.MapPath("/blah/blah.mdb")

objCct.Open

objCct.BeginTrans

objCct.CommitTrans

 

you are reciving this 500 error,because of ur ie setup

to show the reall error follow the steps in the picture

and when u press OK

refresh the page, and whenever there is an error it will display the real error with the line where the error had accured

 

Hope this helps

Tell what happens with u

Best Regards



__________________
Firas S Assaad (TheGeek)
firas489@gmail.com
0096892166434
http://firas-thegeek.blogspot.com
Back to Top View firas_TheGeek's Profile Search for other info by firas_TheGeek Visit firas_TheGeek's Homepage
 
david chong
Newbie
Newbie


Joined: May/17/2006
Online Status: Offline
Info: 2
Added: May/30/2006 at 12:06am | IP Logged Quote david chong

Umm i am a bit confused, what is "objCct" I use "objCnt", can you take a look at my script again, i think the problem isn't what you said because the settings are the same as what you asked me to set them.  I think the problem is here"("/blah/blah.mdb")"  Maybe i typed wrong last time.  Here is my script.

 

<%@ Language=VBScript %>
<% Option Explicit %>
<%
 Dim dbProvider, dbDataSource, objCnt, strSQL
 
 dbProvider = "Provider=Microsoft.Jet.OLEDB.4.0;"
     dbDataSource = Server.MapPath("\Runeanswers\rsdb.mdb")
 

 Set objCnt = Server.CreateObject("ADODB.Connection")
 objCnt.Open dbProvider & "Data Source=" & dbDataSource

 

 if len(Request("username")) > 25 Then
  response.write "Name should not longer than 25 character."
  response.write "<P><A href = 'rsform.htm'>Reenter</A>"
 elseif isnumeric(left(Request("username"),1)) Then
  response.write "Name cant start with number."
  response.write "<P><A href = 'rsform.htm'>Reenter</A>" 
 else
  strSQL="INSERT INTO uplandspkclan (username,gender,"
  strSQL=strSQL & "pked,abilities,comments)"
  strSQL=strSQL & " VALUES "
  strSQL=strSQL & "('" & Cstr(Request.Form("Username")) & "',"
  strSQL=strSQL & "'" & Cstr(Request.Form("gender")) & "',"
  strSQL=strSQL & "'" & Cstr(Request.Form("pked")) & "',"
  strSQL=strSQL & "'" & Cstr(Request.Form("abilities")) & "',"
  strSQL=strSQL & "'" & Cstr(Request.Form("comments")) & "')"
  
  
  response.write "Record Insert Successfully! Welcome to the Uplands clan!"
                 response.write "The clan is uplandsclan, password is avenge ourselves destroy others.
  response.write "<P><A HREF = 'rsform.htm'>Enter Again</A>"
  response.write "<P><A HREF = 'rslist.asp'>See all the people who have joined!</A>"
                 response.write "Wana <a href=sign.asp>login</a>?
                 response.write "Go back to <a href=index.asp>Runeanswers.com</a>!
  
 objCnt.Execute(strSQL)
 end if
 
 objCnt.Close
 set objCnt = nothing

 

%>

 

Thanks

Back to Top View david chong's Profile Search for other info by david chong
 
firas_TheGeek
Newbie
Newbie
Avatar

Joined: May/27/2006
Location: Oman
Online Status: Offline
Info: 28
Added: May/30/2006 at 7:38am | IP Logged Quote firas_TheGeek

Hi,

Please have a look at your FIRST Post and see what you have gave me??

You have used objCct not objCnt

And now what exactly is the problem in your NEW Script?

 

Best Regards



__________________
Firas S Assaad (TheGeek)
firas489@gmail.com
0096892166434
http://firas-thegeek.blogspot.com
Back to Top View firas_TheGeek's Profile Search for other info by firas_TheGeek Visit firas_TheGeek's Homepage
 

If you wish to make a comment to this info you must first login
If you are not already registered you must first register

  A d d  -  P o s tAdd P o s t
Printable version Printable version

Info Jump
You cannot add new info in this area
You cannot add to info in this area
You cannot delete your info in this area
You cannot edit your info in this area
You cannot create polls in this area
You cannot vote in polls in this area

   Active Server Pages Rule The World
Contact Us  
All artwork, design & content contained in this site are Copyright © 1998 - 2024 PowerASP.com and Christopher J. Williams
Banner ads ,other site logos, etc are copyright of their respective companies.
STATS Unless otherwise noted - All Rights Reserved.

Active Server Pages ASP programs help tutorial tutorials routine routines jobs listserve mailinglist bulletin board bulletin boards programming snippet snippets CJWSoft ASPProtect ASPBanner ASPClassifieds www.aspprotect.com, www.cjwsoft.com,www.aspclassifieds.com,www.aspphotogallery.com