All source code in ASP/ VbScript Ask a ASP/ VbScript Pro Discussion Forum Categories All jobs in ASP/ VbScript
Quick Search for:  in language:    
SQL,ASP,Allows,edit,your,database,online,dele
   Code/Articles » |  Newest/Best » |  Community » |  Jobs » |  Other » |  Goto » | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
ASP/ VbScript Stats

 Code: 281,486. lines
 Jobs: 101. postings

 How to support the site

 
Sponsored by:

 
You are in:
 
Login

NEW! LEARNING CENTER
Special educational offers, white papers, webcasts, podcasts

  NEW! Download Rational Performance Tester V8 (download now)
  NEW! Download Rational Functional Tester V8 (download now)
  NEW! Download Rational Service Tester for SOA Quality V8 (download now)
  NEW! Teleconference: Quality In Action - Using Rational Quality Manager with Functional, Performance and Web Service Testing Products (download now)
  NEW! Introducing IBM Rational AppScan Developer Edition – easing security testing by non-security professionals (download now)

 

 


Latest postings for ASP/ VbScript.
Click here to see a screenshot of this code!Mess Officer Management System (Sistem Pengurusan Mess Pegawai)
By Mohd Fauzi on 11/23

(Screen Shot)

Click here to put this ticker on your site!


Add this ticker to your desktop!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!



 
 
   

ASP Newbie Database Editor

Print
Email
 
winzip icon
Submitted on: 11/5/2002 9:49:41 PM
By: Bryan A. Cairns  
Level: Beginner
User Rating: By 12 Users
Compatibility:ASP (Active Server Pages), HTML, VbScript (browser/client side)

Users have accessed this code 16062 times.
 
(About the author)
 
     Allows you to edit your database online. You can add, edit, and delete tables, fields, and records. This also shows how to allow custom SQL statments like adding a autonumber primary field. Probably a few bugs because I an pretty new to ASP and SQL.

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.

Virus note:All files are scanned once-a-day by Planet Source Code for viruses,but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:
1)Re-scan downloaded files using your personal virus checker before using it.
2)NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
1) You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 3 submission(s) by this author

 

 
 Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:
 
Your Vote!

What do you think of this code(in the Beginner category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
11/6/2002 3:08:44 AM

Since you're new to ASP etc, I find it helps lgibility no end to avoid the constant (what I call) context-switching between the server and client-side code. That is, where you do a bit of processing, then switch the output to HTML, go back and do a bit more processing, and so on. To avoid that, I build my HTML into a string and then from time to time call a Sub that does a Response.Write with the string. It makes your stuff look more like a program and it's much easier to see what's going on (and to debug, believe me!)
(If this comment was disrespectful, please report it.)

 
11/6/2002 3:10:48 AM

Also, horses for course and all that, but again, it makes your code much easier to read if it's indented properly. Not:
Sub ChoosePagesSQL(sSQL,sStart, sSize)
set rs=Server.CreateObject("ADODB.recordset")
sqlstmt = sSQL
rs.CursorType = 3
rs.PageSize = cint(sSize)
rs.open sqlstmt, sConnectionString
if isrecordsetempty = false then
rs.AbsolutePage = cINT(sStart)
end if
End Sub

but:
Sub ChoosePagesSQL(sSQL,sStart, sSize)
set rs=Server.CreateObject("ADODB.recordset")
sqlstmt = sSQL
With rs
.CursorType = 3
.PageSize = cint(sSize)
.open sqlstmt, sConnectionString
if isrecordsetempty = false then
.AbsolutePage = cINT(sStart)
end if

End Sub

(If this comment was disrespectful, please report it.)

 
11/6/2002 3:12:54 AM

Oh Jeez, I though PSC would handle spaces properly, at least...To get the idea, paste the above somewhere and remove the first CRLF: it all pops into place then.
(If this comment was disrespectful, please report it.)

 
11/6/2002 6:22:01 AM

Excellent code! As a guide to users who wanted to create a table with the different field types. This line would better fit in with the codes.

'Comments are shown with a "'" in front of them
'Enter your SQL Statments Here as seen below...
Create Table MyTABLE
'Add the autonumber ID field as the primary key
alter table MyTABLE Add ID COUNTER PRIMARY KEY
'Add the other fields
alter table MyTABLE Add Firstname varChar(255)
alter table MyTABLE Add anyDay Date
alter table MyTABLE Add Remarks Memo
alter table MyTABLE Add Amount Currency
alter table MyTABLE Add Download OLEObject
alter table MyTABLE Add Age Integer

(If this comment was disrespectful, please report it.)

 
12/9/2002 5:05:29 PM

Thanks, This was great!!!
(If this comment was disrespectful, please report it.)

 
2/5/2003 1:13:13 AM

Sir, Good afternoon!
Your program is very nice and i really like? i would like to ask if i can use your downloaded code or your program to my website which i think that will help us. hope sir you can email thank you
(If this comment was disrespectful, please report it.)

 
2/6/2003 3:27:10 AMIan Northwood

You might want to take a look at UTE (Universal Table Editor) which has a fabbo marvy UI and now includes the ability to choose tables (previous versions had to specify table name in the URL). https://sourceforge.net/project/showfiles.php?group_id=65946. There may be a version posted here, too, but it may not be the latest, 2.1.
(If this comment was disrespectful, please report it.)

 
2/17/2003 11:59:27 PM

Hello:

I was trying to use this script and am getting some errors.

When I try to updated, add or delete, I get the following error:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Microsoft Access Driver] Cannot update. Database or object is read-only.

/beta/databaseadmin.asp, line 657

Can you please help me with this. The database has full read write permissions

thanks.
(If this comment was disrespectful, please report it.)

 
2/22/2003 3:22:02 PM

This is a pretty cool code. Unfortunately, every time I go to edit or delete a record I get an error on line 394...
But it did allow me to view a database that was designed in OfficeXP and I have Office 97. I can now recreate that database, so I love it!
(If this comment was disrespectful, please report it.)

 
3/6/2003 2:37:36 PMBrant Wells

Hey. :) The code doesn't work on my machine, cause I've only got Office 95... (Don't laugh! 8-P). But I tinkered with it, and really like what I see. Excellent piece of coding!

(If this comment was disrespectful, please report it.)

 
3/16/2003 3:30:16 PMMartin Kilbryde

Brill! Just what I needed, I couldnt be bothered making my own.
(If this comment was disrespectful, please report it.)

 
4/21/2003 8:07:29 PM

This code is da bomb...i've been tryin to do something like that for a long time, and i have reserched every tutorial around, but i cant find one of the most important thigs, and that is the way to show a table definition.
Tks for the code man
(If this comment was disrespectful, please report it.)

 
9/17/2003 4:28:33 AMTom Level

hi i tried adding a memo field but didnt work for me. is this a bug?
(If this comment was disrespectful, please report it.)

 
11/27/2003 2:54:40 AM

Microsoft OLE DB Provider for ODBC Drivers error '80040e10'

[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.

/databaseadmin.asp, line 394

(If this comment was disrespectful, please report it.)

 
1/12/2004 1:25:07 AMmarkwong

i have to test this OK..THNAX PSC.com = planetsourcecode.com.. WAAAAAAAAAAA

(If this comment was disrespectful, please report it.)

 
4/1/2004 11:17:44 AMaspbev

how do you get rid of the field definitions when adding a record. the users dont like looking at the field desciptions on the right hand side of the entry form? thanks
(If this comment was disrespectful, please report it.)

 
11/26/2004 12:46:35 AMFiras S. Assaad

Dear Bryan A. Cairns,
Your code is fantastic, but if u don't mind can u send me to my email busyLOD@hotmail.com the SQL Code Statement for how to add the fields types

Thnx for ur time
Firas S Assaad

I'll be apreciated if u do as soon as posible cause i want to finish my school project as soon as posible

Thnx again
(If this comment was disrespectful, please report it.)

 
12/10/2004 10:32:54 AM

I'm having the same problem:

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.


Helllppp!!
(If this comment was disrespectful, please report it.)

 
6/6/2005 6:05:29 PM

It works great with access and SQL. is there a way to make it work with mySQL?
(If this comment was disrespectful, please report it.)

 
1/14/2008 12:29:58 PMRajnedra Vyas BLT

I was trying to use this script and am getting some errors.

When I try to updated, add or delete, I get the following error:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Microsoft Access Driver] Cannot update. Database or object is read-only.

/beta/databaseadmin.asp, line 657

Can you please help me with this. The database has full read write permissions

thanks.
Please Guide me Why I am getting This ERROR..........
(If this comment was disrespectful, please report it.)

 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author from the email account you registered on the site, so you can correspond directly.

NOTICE: The author of this code has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular code, please click here.
 
To post feedback, first please login.


 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Feedback | Customize | ASP/ VbScript Home | Site Home | Other Sites | Open Letter from Moderators | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright© 1997-2008 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.   Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.