Solved

any asp script / applet / web interface what allows editing of a .mdb file

Posted on 2001-07-27
12
232 Views
Last Modified: 2012-06-21
is there any free asp script/ applet /web interface what allows querying / editing of a .mdb file?

i would like to use such application so that i can edit my mdb file via Web.

thanks,

bun
0
Comment
Question by:bunwong
  • 3
  • 3
  • 2
  • +4
12 Comments
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 6328305
By edit I assume you mean add data to a table, edit data in a table, delete data from a table?

1) set up a DSN on the Web Server to point to the MDB

then in you ASP code:

<%
   Dim rsData, strSQL, cnn

   set cnn = Server.CreateObject("ADODB.Connection")
   cnn.COnnectionString = "DSN=,your DSN>;"
   cnn.Open

   strSQL = "SELECT * FROM <yourtable>"
   set rsData = Server.CreateObject("ADODB.Recordset")
   
   rsData.Open strSQL, cnn

   ' you now have a recordset containg all of the data in the table
   with rsData
      do while not .EOF
          Response.Write "<INPUT ID=Field1 Name=FIELD1 Value=" & .Fields(1) & "><BR>"
          .MoveNext
      loop
   end with

   rsData.Close
   cnn.Cloase
   set rsData = Nothing
   set cnn = Nothing
%>


That will get the data from the first field in the table, and display each record's value in an Input box on the resulting page.

Beyond that, you should really buy a book on how to Program with ASP (WROX Press has a very good book : "Beginning ASP 3.0"

Arthur Wood
0
 
LVL 11

Expert Comment

by:joekendall
ID: 6328436
You can find excellent information on connecting to an Access Database from http://www.asp101.com/.

Joe
0
 
LVL 14

Expert Comment

by:mgrattan
ID: 6330320
An excellent web site for developing/testing ASP applications is http://www.brinkster.com.  They give you 30mb of space to play with for free.  You can post MDB files and use the ASP scripts against those files for testing.
0
 
LVL 12

Expert Comment

by:Paurths
ID: 6330930
a little tip to stay out of trouble with recordsets in an ASP page.
Always test for EOF and BOF before moving into the recordset!
While at it, here is an example of a DSN-less connection.
(the mdb is located in the same directory as the page)


<% @LANGUAGE = "VBScript" %>
<% Response.Buffer = True
'just in case u would use redirect
%>
<html>
<bla-bla-bla..>


<%
strSQL = "Select * from YourTable;"

'Setting up a DSN-less Connection    
connStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("NameOfDB.mdb") & ";Persist Security Info=False"

set conn=server.createobject("adodb.connection")

conn.open connStr

set rst=conn.execute(strSQL)

IF (NOT rst.EOF) AND (NOT rst.BOF) THEN
  'Testing to see if any records were found
  'only testing the eof or bof wont do sometimes
  'records found

  rst.movefirst

  'do something...

ELSE
  %>

  sorry, no records found for u...

<%
END IF
rst.close
set rst = nothing
conn.close
set conn = nothing
%>


cheers
Ricky
0
 
LVL 12

Expert Comment

by:Paurths
ID: 6330934
one more tip so your db-host wont kick u off their servers :

always destroy your objects...
close them, and set them to nothing.
0
 
LVL 14

Expert Comment

by:mgrattan
ID: 6381705
Hi bunwon,

Will any of the posted suggestions work for you?
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 

Author Comment

by:bunwong
ID: 6382470
sorry that there are on comment work for me, because i want a FREE DOWNLOAD that can fix the problem. i am not intend to write an asp script/applet by myself. i have already developed an activeX one. i am search for a free download just becuase i don't like to install an activeX component every time i touch a new pc.

i am looking for something like the DBGrid in activeX - generic, straight forward edit (and quite complicated to develop :-) ). it will take me a lot of time for me to develope such feature asp script/applet, so i just ask if anyone know if there is already one exist. if no download avaliable, i would rather use the existing activeX one.

bun
0
 
LVL 12

Expert Comment

by:Paurths
ID: 6382971
well,
i am not aware of such an activeX, but if u write one, let us know.

cheers
Ricky
0
 
LVL 14

Expert Comment

by:mgrattan
ID: 6384576
I don't know of any free downloads either.  The best free online tool I've seen so far is Brinkster; and to use that, you have to run SQL queries to create/modify your tables.
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 6405951
While it is off the subject somewhat, ASP.NET will allow you to write code to fill what is essentially a DBGrid (though it is actually implemented entirely in standard HTML), with the need to download any activex controls whatsoever.
0
 

Expert Comment

by:amp072397
ID: 6784133
bunwong:

Please reply to your open questions:

http://www.experts-exchange.com/jsp/qShow.jsp?qid=20142353
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20147846
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20155858
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20159346

To assist you in your cleanup, I'm providing the following guidelines:

1.  Stay active in your questions and provide feedback whenever possible. Likewise, when feedback has not been provided by the experts, commenting again makes them receive an email notification, and they may provide you with further information. Experts have no other method of searching for questions in which they have commented, except manually.

2.  Award points by hitting the Accept Comment As Answer button located above and to the left of that expert's comment.

3.  When grading, be sure to read:
http://www.experts-exchange.com/jsp/cmtyQuestAnswer.jsp#3
to ensure that you understand the grading system here at EE. If you grade less than an A, you must explain why.

4.  Questions that were not helpful to you should be PAQ'd (stored in the database for their valuable content?even if not valuable to you) or deleted. To PAQ or delete a question, you must first post your intent in that question to make the experts aware. Then, if no experts object after three full days, you can post a zero-point question at community support to request deletion or PAQ. Please include the link(s) to the question(s).
CS:  http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
At that point, a moderator can refund your points and PAQ or delete the question for you. The delete button does not work.

5.  If you fail to respond to this cleanup request, I must report you to the Community Support Administrator for further action.

Our intent is to get the questions cleaned up, and not to embarrass or shame anyone. If you have any questions or need further assistance at all, feel free to ask me in this question or post a zero-point question at CS. We are very happy to help you in this task!


thanks!
amp
community support moderator

9/9
0
 
LVL 5

Accepted Solution

by:
Netminder earned 0 total points
ID: 6958422
Per recommendation, points refunded and question closed by
Netminder
CS Moderator
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

939 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now