How to save data to access database in dreamweaver

Hello,
I want to save data from webpage to MS access database. I am
using dreamweaver MX 2004 developing tool. For server side
scripting I am using asp page but I am not geting any result. And I
am calling this asp page using HTML codes (using "action").
Please anybody suggest me proper way for this.

Thanks for the reply....I'will try your suggestion
........But still I will appriciate if you can check my codes......
I am using following codes for webpages,
<form name="form1" action="add_to_database.asp"
method="post">
<div align="center">
<table width="80%" border="0">
<td><b>FEEDBACK FORM</b></td>
<tr> <td>Name :</td>
<td><input type="text" name="uname"></td>
</tr>
<tr>
<td>Email :</td>
<td> <input type="text" name="email"></td>
</tr>
<tr>
<td>Comments :</td>
<td><textarea
name="comments"></textarea></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" value="Submit details"
name="submit" onClick="validate()" ></td>
</tr>
</table>
</div>
</form>
and using the action and post method I am calling following
asp page
<body>
<%
Dim uname, email, comments
Dim Conn
Dim Rs
Dim sql
uname = Request.Form("uname")
email = Request.Form("email")
comments =Request.Form("comments")
Set Conn = Server.CreateObject("ADODB.Connection")
Set Rs = Server.CreateObject("ADODB.Recordset")
Conn.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;" & "Data
Source=" & Server.MapPath("users.accdb")
sql= "INSERT into adduser(uName, Email, Comments) values(' "
& uname & "', '" & email & "', '" & comments
Conn.execute sql
Rs.Open sql, Conn
Rs.AddNew
Rs.Fields("Name") = Request.Form("name")
Rs.Fields("Email")=Request.Form("email")
Rs.Fields("Comments") = Request.Form("comments")
Rs.Update
Rs.Close
Set Rs = Nothing
Set Conn = Nothing
%>
</body>
Thanks,

Similar Messages

  • How to save the current access database as a new file with a specified name

    what I am trying to do is after writing data to a public access file, save it as a new access file,
    clear the public access file and write new data in it.
    repeat the above process when requested by the operator.
    which database function should I use to execute this "save as " action?
    thank you...
    Solved!
    Go to Solution.

    I'm not sure what DB tools you are using in LabVIEW however I was able to locate the following function that seems to accomplish what you asked about.
    DB Tools Save Recordset To File VI: http://zone.ni.com/reference/en-XX/help/370016C-01/lvdatabase/db_tools_save_recordset_to_file/
    As far as database applications go there are several examples included in LabVIEW some of which include SQL functions as well.
    Regards,
    Isaac S.
    Regards,
    Isaac S.
    Applications Engineer
    National Instruments

  • How to save data in DB2 database

    Hi All,
    I have an SAP webdynpro application in which 10 fields are there for the user to enter. Out this 10 fields i need to save 5 fields in SAP database and another 5 in DB2 database.Please help me how to achieve this.
    Regards
    VEnk@

    Dear Venkat,
    Am I right that your requirement is to save some fields into the SAP DB2 database and to save the other fields
    to an external DB2 database.
    For that you have to setup the connection with transaction DBCO (tabel DBCON),
    For details about "how to..." please refer to sap note 323151.
    Hope this will help you.
    Regards,
    Reinhard Meixner

  • How to save data in ztable after editing in alv report

    how to save data in ztable after editing in alv report?

    Hi,
        Please find the attachment below.This may be usefull to you.
         [http://wiki.sdn.sap.com/wiki/display/Snippets/ALV-Editingandsavingtheeditedvaluesin+Database%28OOPS%29]
    Regards,
    Ramakrishna Yella.

  • How to save pdf file in database

    Dear All,
    my application is forms 6i and database is 8i,requirement is that how to save pdf file in database and users can view through forms

    I'll apologize up front for the length of this post. I have a few database procedures I created that write a file to a BLOB column in a table as well as retrieve the BLOB from the column after it stored there. I have successfully stored many different types of binary file to the database using these procedures - including PDF files. I have not used these procedures in a Form so I can confirm that they will work, but theoretically they should work. I'm including the code for each procedure in this posting - hence the apology for the long post! :-)
    Also, since these procedures reside on the database you will need to use Forms TEXT_IO built-in package to write your file to the server before you can use these procedures to store and retrieve the file from the database.
    These procedures reads and writes a binary file to a table called "LOB_TABLE." You will need to modify the procedure to write to your table.
    -- Author :  Craig J. Butts (CJB)
    -- Name   :  load_file_to_blob.sql
    --        :  This procedure uses an Oracle Directory called "IN_FILE_LOC".  If you
    --           already have a directory defined in the database or would prefer to use
    --           a different Directory name, make sure you modify line 21 to reflect the
    --           new Directory name.
    -- ==================================================================================
    -- History
    -- DATE        WHO         DESCRIPTION
    -- 12/11/07    CJB         Created.
    CREATE OR REPLACE PROCEDURE load_file_to_blob (p_filename IN VARCHAR2) IS
       out_blob    BLOB;
       in_file     BFILE;
       blob_length INTEGER;
       vErrMsg     VARCHAR2(2000);
    BEGIN
       -- set the in_file
       in_file := BFILENAME('IN_FILE_LOC',p_filename);
       -- Get the size of the file
       dbms_lob.fileopen(in_file, dbms_lob.file_readonly);
       blob_length := dbms_lob.getlength(in_file);
       dbms_lob.fileclose(in_file);
       -- Insert a new Record into the tabel containing the
       -- filename specified in P_FILENAME and a LOB_LOCATOR.
       -- Return the LOB_LOCATOR and assign it to out_blob.
       INSERT INTO lob_table (filename, blobdata)
          VALUES (p_filename, EMPTY_BLOB())
          RETURNING blobdata INTO out_blob;
       -- Load the file into the database as a blob.
       dbms_lob.open(in_file, dbms_lob.lob_readonly);
       dbms_lob.open(out_blob, dbms_lob.lob_readwrite);
       dbms_lob.loadfromfile(out_blob, in_file, blob_length);
       -- Close handles to blob and file
       dbms_lob.close(out_blob);
       dbms_lob.close(in_file);
       commit;
       -- Confirm insert by querying the database
       -- for Lob Length information and output results
       blob_length := 0;
       BEGIN
          SELECT dbms_lob.getlength(blobdata) into blob_length
            FROM lob_table
           WHERE filename = p_filename;
       EXCEPTION WHEN OTHERS THEN
          vErrMsg := 'No data Found';
       END;
       vErrMsg := 'Successfully inserted BLOB '''||p_filename||''' of size '||blob_length||' bytes.';
       dbms_output.put_line(vErrMsg);
    END;
    -- Author   :  Craig J. Butts (CJB)
    -- Name     :  write_blob_to_file.sql
    -- Descrip  :  This procedure takes a BLOB object from a database table and writes it
    --             to the file system
    -- ==================================================================================
    -- History
    -- DATE        WHO         DESCRIPTION
    -- 12/11/07    CJB         Created.
    CREATE OR REPLACE PROCEDURE write_blob_to_file ( p_filename IN VARCHAR2 ) IS
       v_blob      BLOB;
       blob_length INTEGER;
       out_file    UTL_FILE.FILE_TYPE;
       v_buffer    RAW(32767);
       chunk_size  BINARY_INTEGER := 32767;
       blob_position INTEGER := 1;
       vErrMsg     VARCHAR2(2000);
    BEGIN
       -- Retrieve the BLOB for reading
       BEGIN
          SELECT blobdata
            INTO v_blob
            FROM lob_table
           WHERE filename = p_filename;
       EXCEPTION WHEN OTHERS THEN
          vErrMsg := 'No data found';
       END;
       -- Retrieve the SIZE of the BLOB
       blob_length := DBMS_LOB.GETLENGTH(v_blob);
       -- Open a handle to the location where you are going to write the blob
       -- Note:  The 'WB' parameter means "Write in Byte Mode" and is only
       --          available in the UTL_FILE pkg with Oracle 10g or later.
       --        USE 'W' instead for pre Oracle 10q databases.
       out_file := UTL_FILE.FOPEN('OUT_FILE_LOC',p_filename, 'wb', chunk_size);
       -- Write the BLOB to the file in chunks
       WHILE blob_position <= blob_length LOOP
          IF ( ( blob_position + chunk_size - 1 ) > blob_length ) THEN
             chunk_size := blob_length - blob_position + 1;
          END IF;
          dbms_lob.read(v_blob, chunk_size, blob_position, v_buffer );
          UTL_FILE.put_raw ( out_file, v_buffer, TRUE);
          blob_position := blob_position + chunk_size;     
       END LOOP;  
    END;Hope this helps.
    Craig...
    -- If my response or the response of another is helpful or answers your question please mark the response accordingly. Thanks!

  • How to introduce data in a database oracle

    how to introduce data in a database oracle from a text fields using jsp pages.
    supposing :
    my text field is nombreText
    my database fields is nombre_cliente
    �how guards-how saves!
    please.....

    http://developer.java.sun.com/developer/onlineTraining/Database/JDBC20Intro/

  • Pb to transfert Date in access Database

    Hi,
    I have a problem to transfert date in access database.
    I get the date in java:
    Calendar theCalendar = java.util.Calendar.getInstance();
    int month = theCalendar.get(Calendar.MONTH)+1;
    int dayOfMonth = theCalendar.get(Calendar.DAY_OF_MONTH);
    String dateString = new Integer(theCalendar.get(Calendar.YEAR)).toString();
    dateString = dateString + "-" + month + "-" + dayOfMonth ;
    then I update the statement (odbc) , everything is ok except that for the dateString =2004-05-11, when I look in my database (field defined as Date/Time), I read 6/10/1905 witch is "little" different.
    I try to do a Date rightNow = java.sql.Date.valueOf(dateString); and put the rightNow in the statement , equal !
    I try also to change the dateString with yyyy/mm/dd then I get strange values in access
    Does somebody could help me, I'm a beginner,
    thank a lot

    Y.Brunet, I can not be as sure in my words as you are, since I don't know how other companies and programmers solve these problems, but I cannot easily accept your advice to code dates as Strings.
    In our company's projects everywhere in DB handling code we use PreparedStatements because AFAIK they provide better performance than CallableStatements if frequently used. Also they provide abstraction level - why should I know how the f!@# the Database expects dates/int/float/String... in SQL statements?
    We use several DB servers - M@SQL, Access, Oracle, Ingres - they all handle dates in different way(not to mention that in most DBs date format is customizable). But code written for one server works on others (most of it, of course) because of this level of abstraction.
    Let's leave the driver format the stuff as the DB expects and concentrate on the real work - pass correct values, perform logical checks, improving performance.....
    Mike

  • How do i connect ms access database in Eclipse ?

    Help me to solve the problem
    how do i connect ms access database in Eclipse ?
    Its urgent please
    give any link that gives the procedure to connect ...........

    The Eclipse WTP by default has a database explorer: Window - Show View - Data. Finally rightclicking at the new "DB Servers" console gives straightforward menu options.

  • How to extract data from oracle database directly in to bi7.0 (net weaver)

    how to extract data from oracle database directly in to bi7.0 (net weaver)? is it something do with EDI? can anybody explain me in detail?
    Thanks
    York

    You can use UDConnect to get from Oracle database in to BW
    <b>Data Transfer with UD Connect -</b>
    http://help.sap.com/saphelp_nw04/helpdata/en/78/ef1441a509064abee6ffd6f38278fd/content.htm
    <b>Prerequisites</b>
    You have installed the SAP WAS J2EE Engine with BI Java components.  You can find more information on this in the SAP BW installation guide on the SAP Service Marketplace at service.sap.com/instguides.
    Hope it Helps
    Chetan
    @CP..

  • Could u plz help me to find simple example for how to save data file in a spread sheet or any other way in the real time controller for Sbrio 9642 using memory or usb flash memory

    Could u plz help me to find simple example for how to save data file in a spread sheet or any other way in the real time controller for Sbrio 9642 using memory or usb flash memory

    Here are a few Links to a helpful Knowledge Base article and a White Paper that should help you out: http://digital.ni.com/public.nsf/allkb/BBCAD1AB08F1B6BB8625741F0082C2AF and http://www.ni.com/white-paper/10435/en/ . The methods for File IO in Real Time are the same for all of the Real Time Targets. The White Paper has best practices for the File IO and goes over how to do it. 
    Alex D
    Applications Engineer
    National Instruments

  • Upload data from Access Database to Oracle Database In oracle 8i

    hi everybody
    i am trying upload data from Access database to Oracle Database
    i have TT(F1,F2,F3) table in Access Databsse
    and emp(ename,ecode,sal) in oracle Database
    db_ac is my datasource name
    when i connect to Access Database thru this command this show following error
    SQL> connect a/a@odbc:db_ac;
    ORA-00022: invalid session id; access denied
    ORA-00022: invalid session id; access denied
    ORA-00022: invalid session id; access denied
    Error accessing PRODUCT_USER_PROFILE
    Warning: Product user profile information not loaded!
    You may need to run PUPBLD.SQL as SYSTEM
    Server not available or version too low for this feature
    ORA-00022: invalid session id; access denied
    Connected.
    when i am trying copy data as this command it show error and data not copied.
    SQL> COPY FROM A/A@ODBC:DB_AC TO test/test@ora INSERT EMP USING SELECT F1,F2,F3 FROM TT;
    Array fetch/bind size is 15. (arraysize is 15)
    Will commit when done. (copycommit is 0)
    Maximum long size is 80. (long is 80)
    ORA-00022: invalid session id; access denied
    ERROR:
    OCA-00022: general OCA error
    can help me .
    with thanx

    Hi there,<br>
    <br>
    Please kindly use instead the Database Forum at:-<br>
    General Database Discussions<br>
    <br>
    ... to place your question as this is for the Oracle Portal product Export / Import functionality.<br>
    <br>
    <br>
    Kind regards,<br>
    Pedro.

  • How to save data model design in pdf or any format..?

    how to save data model design in pdf or any format..?
    i ve created design but not able to save it any mage or pdf format

    File -> Print Diagram -> To PDF File

  • How to save datas automaticly making use of SQL Toolkit ?

    Hello !
    I have amounts of datas to be saved automaticly,so I want to use database.I've  registered ODBC data source in my computer.
    As the test datas are saved automaticly,I only write a function to save the datas into database.
    //write datas into database
    void WriteYBdata(char* FileName)
    char *time1;
    char *date1;
    char date[27];
    int hstmt,id,status;
    date1 = DateStr ();
    time1 = TimeStr ();
    Fmt(date,"%s<%d[w4p0]/%d[w2p0]/%d[w2p0]",date1,time1);
    hstmt = DBActivateSQL (hdbc, "SELECT * FROM ybdata");
    DBBindColInt (hstmt, 1, &id, &status);
    DBBindColChar (hstmt, 2, 27, date, &status, "");
    DBBindColFloat (hstmt, 3, &CH4, &status);
    DBBindColFloat (hstmt, 4, &CO2, &status);
    DBBindColFloat (hstmt, 5, &O2, &status);
    DBBindColFloat (hstmt, 6, &CO, &status);
    DBBindColFloat (hstmt, 7, &H2S, &status);
    DBBindColInt (hstmt, 8, &TEM, &status);
    DBBindColInt (hstmt, 9, &HUM, &status);
    DBCreateRecord(hstmt);
    DBPutRecord(hstmt);
    DBDeactivateSQL(hstmt);
    void WritePSMdata(char* FileName)
    char *time2;
    char *date2;
    char date[27];
    int hstmt,id,status;
    date2 = DateStr ();
    time2 = TimeStr ();
    Fmt(date,"%s<%d[w4p0]/%d[w2p0]/%d[w2p0]",date2,time2);
    hstmt = DBActivateSQL (hdbc, "SELECT * FROM psmdata");
    DBBindColInt (hstmt, 1, &id, &status);
    DBBindColChar (hstmt, 2, 27, date, &status, "");
    DBBindColInt (hstmt, 3, &wy_voltage,&status);
    DBBindColFloat (hstmt, 4, &zy_y1, &status);
    DBBindColFloat (hstmt, 5, &zl_i1, &status);
    DBBindColInt (hstmt, 6, &wx, &status);
    DBBindColInt (hstmt, 7, &wg, &status);
    DBBindColInt (hstmt, 8, &ws, &status);
    DBCreateRecord(hstmt);
    DBPutRecord(hstmt);
    DBDeactivateSQL(hstmt);
     I connect the database in the main function.
    I've been debug the program and it communicates normally, but it does not save datas into the database.
    The attachment is my program.It is my first time to use SQL Toolkit and I'm not familiar with it.  I would appreciate it very much if you could give me some help..
    Best regards.
    xiepei
    I wouldn't care success or failure,for I will only struggle ahead as long as I have been destined to the distance.
    Attachments:
    Sava All Data.zip ‏37 KB

    Hi !
    Thank you very much for your reply.
    That line I want to set the time format and it could use the funtion  
    DBBindColChar (hstmt, 2, 27, date, &status, "");
    I do not know it is right or wrong.I could not see any response in this line.
    My original idea is recording the date and time when saving the datas.
    Would you have any good idea according to it ?
    I wouldn't care success or failure,for I will only struggle ahead as long as I have been destined to the distance.

  • How to insert data from access to sql server ?

    How to insert data from access to sql server ?
    Please help me
    thanks

    phamtrungkien wrote:
    How to insert data from access to sql server by JAVA?The first four words of my last post:
    masijade wrote:
    JDBC with two connectionsGet a resultset from the jdbc-odbc bridge access connection, cycle through it and add batch insert commands to the jdbc connection to sql server. Give it a try and if the code has an error, then post your code ans ask a question.
    The real question, though, is why you think it absolutely necessary to use Java for this.

  • How to view corrupt ms access database?

    How to view corrupt ms access database? When you open a written "Application Error" and all. Tried to import objects into a
    new database. Tables and queries were imported without a problem, but on the forms, reports and modules gives the same error. 

    if it fails to recover all known methods, which are described in google, then you need software - such as MDB Viewer Tool from http://www.mdb.viewertool.com/ Somewhere
    seen a similar problem on the forum if it fails to recover all known methods, which are described in google, then you need software - such asMDB Viewer Tool from http://www.mdb.viewertool.com/Somewhere
    seen a similar problem on the forumhttp://www.filerepairforum.com/forum/microsoft/microsoft-aa/access/1318-unable-to-open-mdb-file-please-help

Maybe you are looking for

  • Why increase in monthly billing

    My bill was quoted at $101.49 and has been that amount; however, upcoming bill is for $120.14, a difference of $18.65. Please explain why the increase. Thank you.

  • 2 devices, "contacts" "my info" question

    I have an iPad and wife has iPhone. We are using one iCloud account to share contacts, calendar, reminders, etc... And then separate sub accounts on iCloud for email only. The problem is under Settings>Mail, Contacts, Calendars>Contacts>My Info>? I p

  • How can i recover lost pictures and vids

    PLs pls will some1help me ive lost priceless baby pictures over 2000 pics n vidz

  • Problems With FTP Upload in Leopard 10.5.3-4

    Hi, I experience a strange problem with ftp upload speed in 10.5.3-4. When I start upload a file to my trusted ftp server the upload speed starts to decrease from 300 kb/sec to 35 -40 kb/sec. It remains normal for 1-2 minutes (about 300 kb/sec) and t

  • FCP crashes every 10 min = browser thumbnail icon is cause or effect

    I have been using FCP on a MacPro with 8gb of ram and a 2tb video raid. For the last several months, the program has been crashing VERY often (every 15 min). The crashing always occurs when I open a browser bin with video icons. As FCP brings up the