Update a record in Ms-Access database

Hi experts. I am using IIS web server.

How to Update a record into the database.

Please provide the sample code
starting from Opening DSN till adding data in that


rajasekaranAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MasseyMCommented:
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "YourDSn", "", ""
Set RS = Server.CreateObject("ADODB.RecordSet")
SQL = "SELECT * FROM MyTable WHERE MyField='" & SomeString & "';"
RS.Open SQL, Conn, 3, 3

RC = RS.RecordCount
If RC  0 then
  RS.AddNew ' Add a new record if the one you want to update doesn't exist
End If
  RS("FieldName") = Request("FieldFromForm")
  RS.Update  ' Send the changes to the database..
RS.Close
Set RS = nothing
Conn.Close
Set Conn = nothing
%>
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rajasekaranAuthor Commented:
But i need Perl code
0
MasseyMCommented:
Why use PERL when you can use ASP... ASP is already installed on an IIS 4.0 server...
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

rajasekaranAuthor Commented:
The Problem is
I have already written a code , where it should upload a file from the client to the server and some basic info. has to be recorded in Ms-Access.

I am not finding any code in ASP to upload the file from client to server, whereas i got a Perl code where it will upload it in server.

That's the reason i asked for same perl code to record some data in MS-Access

So dear expert
If you know the code (in ASP) to upload a file,it will be easy and usefule for me
OR
Code to store the data in a database using Perl

Regards


0
MasseyMCommented:
There is no reason you cannot use both... Simply redirect to the ASP page (after the file is uploaded)...

0
rajasekaranAuthor Commented:
The Problem is
I have already written a code , where it should upload a file from the client to the server and some basic info. has to be recorded in Ms-Access.

I am not finding any code in ASP to upload the file from client to server, whereas i got a Perl code where it will upload it in server.

That's the reason i asked for same perl code to record some data in MS-Access

So dear expert
If you know the code (in ASP) to upload a file,it will be easy and usefule for me
OR
Code to store the data in a database using Perl

Regards


0
rajasekaranAuthor Commented:
But what is the command to redirect
from .pl file to a .asp file

0
MasseyMCommented:
I do not know PERL at all...  In ASP, you do
<%
response.redirect "yourpage.asp"
%>

Also, when using ASP, you can actually use PERLScript within the ASP file...
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Scripting Languages

From novice to tech pro — start learning today.