Signup · Login
Stardeveloper.com  
Home · Tutorials · Forums · ASP.NET Newsletter Application · Web Hosting Plans · Faisal Khan's Blog · Contact
Forums : ASP : ASP 3.0 : Can't Delete Files from Database Signup · Login
Author Thread
Can't Delete Files from Database
Posted in tutorial: An ASP Tutorial to create your own Database driven Search Engine
·  commtelnetworks
User
Joined: 16 Oct 2007
Total Posts: 4

Can't Delete Files from Database

Posted: 16 Oct 2007
In addtodb.htm file, when I specify files to delete from database, the following error occurs:

Error Type:
Microsoft VBScript compilation (0x800A0411)
Name redefined
/search/delfromdb.asp, line 11, column 9
Dim con, strDB
--------^

Please help me with this. I m stuck up....
·  Faisal Khan
AdminAdminAdminAdmin
Joined: 24 Sep 2002
Total Posts: 595
Re: Can't Delete Files from Database
Posted: 16 Oct 2007
It is possible that 'con' would have been already declared in one of the include files. Just remove the Dim con statement. Change this:


Dim con, strDB


To:


Dim strDB


And try again. If you get "Name redefined" error again. Remove 'Dim strDB' line as well.

Let me know if it works.

Faisal Khan.
Stardeveloper.com
Read Blog | Follow on Facebook, Twitter
·  commtelnetworks
User
Joined: 16 Oct 2007
Total Posts: 4
Can't Delete Files from Database
Posted: 17 Oct 2007
Yes Sir, it has worked! I am totally new to asp. Thanks a million for your help. I just removed the line as per your instruction:

Dim con, strDB

I have one more doubt Sir. In Insert / Update File : ( using FileSystemObject ), it is giving me the following error:

Error Type:
Microsoft VBScript runtime (0x800A0035)
/search/addtodb_fso.asp, line 24


Waiting for your reply

Thanks!
·  Faisal Khan
AdminAdminAdminAdmin
Joined: 24 Sep 2002
Total Posts: 595
Re: Can't Delete Files from Database
Posted: 17 Oct 2007
The line that is giving you error is:


Set file = fso.OpenTextFile(path, 1, False)

I don't see much wrong with that line as far code is concerned. Perhaps there is no file as specified in the "path".

Faisal Khan.
Stardeveloper.com
Read Blog | Follow on Facebook, Twitter
·  commtelnetworks
User
Joined: 16 Oct 2007
Total Posts: 4
Can't add data to the database after uploading
Posted: 25 Oct 2007
Hi Faisal,

Thanks a lot for your help earlier. The tutorial is working fine but when I uploaded it, I am not able to add data to the database. Is it due to the follo line in addtodb.asp:

Set geturl = CreateObject("Stardeveloper.GetURL")
Want to leave a comment? Login or Register for free!

Users Who Have Visited This Thread In Last 24 Hours
1 Visitor

Login to post a comment or start a new thread
UserName Or Email Address:       Password:       Auto-Login:    
· Create New User Account
· Send Forgotten Password by Email
 
© 1999 - 2010 Stardeveloper.com, All Rights Reserved.