Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default SQL Database in ASP

    Hello All,
    I don't know if this is the right group or not to discuss this issue with, but I am hoping so. I have an SQL database and am trying to use frontpage as my interface. I am able to query the database fine and present the data on a webpage; however, I want a way to modify- add entries and such from the website. The question is, how do I do this within Frontpage on an interrelational database.

    For a simple example. I have these three tables tblstaff, tblposition, tblstaffposition

    tblstaff is just an sequence number for each staff, the staff's first and last name
    tblposition is just a sequence number and the positions
    tblstaffposition is just sequence number for staff and sequence number for position

    If I use the following, I get results and with modifying which fields get shown, I can have the results of just the staffs' names and position

    SELECT tblstaff.iseq, tblstaff.clname, tblstaff.cfname, tblposition.iseq, tblposition.cposition, tblstaffposition.iseqStaff, tblstaffposition.iseqPosition
    FROM tblstaff, tblposition, tblstaffposition
    WHERE tblstaffposition.iseqstaff = tblstaff.iseq
    AND tblstaffposition.iseqposition = tblposition.iseq

    However, I want to be able to add new staff and assign them positions within the webpage. THat is where I am stuck at. I can create a submittal page for tblstaffposition and be able to enter the sequence number for staff and position. But what I want to do is add a staff name and from a drop down list, click on position and for the webpage to add the staff member into tblstaff with a new sequence number and to add the staff name sequence number and position name sequence number into tblstaffposition

    Can someone point me in the right direction.

    --
    Robert Cohen
    A legend in his own mind
    --

    Robert Cohen Guest

  2. Similar Questions and Discussions

    1. MySQL Database not retrieving the full database
      Hi, I am using MySQL and PHP for my repository. It has 500+ records. till now it was displayiing all records in the database, but since from one...
    2. Import Data from flat-database to relational-database
      Before I start I need some tips and pleas excuse my bad english. I have two databases, one is flat and one is a relational database. example ...
    3. NEWBIE HELP Import Data from flat-database to relational-database
      I want to import Data from a simple Database, which contains all Information in one big record into a relational Database and split up the big...
    4. Passing database info to page allow user input then pass into another database
      Hi I really am going crazy! I'm using VBScript, ASP, and SQL My page reminds me of a shopping cart but looking at shopping cart examples has not...
    5. Another user has modified the contents of this table or view; the database row you are modifying no longer exists in the database;
      Hi, I am testing a trigger that and I am getting this error message saying "Another user has modified the contents of this table or view; the...
  3. #2

    Default Re: SQL Database in ASP

    Instead of executing a SELECt, you execute an INSERT like so:

    <%
    sName = Request.Form("txtName")
    sSQL = "INSERT INTO TheTable (PersonName) VALUES ('" & Replace(sName, "'",
    "''") & "')"
    Set oADO = Server.CreateObject("ADODB.Connection")
    oADO.Open YourConnectionString
    oADO.Execute sSQL
    oADO.Close : Set oADO = Nothing
    Response.Write sName & " was inserted."
    %>

    How you do this in Frontpage? I don't know. If at all possible, do not use
    Frontpage to generate code. Hand-coding your ASP code will save you lots of
    headaches...

    Ray at work


    "Robert Cohen" <rcohen@NOSPAM.bbhtx.org> wrote in message
    news:%23nw$n29zDHA.1500@TK2MSFTNGP12.phx.gbl...
    Hello All,
    I don't know if this is the right group or not to discuss this issue
    with, but I am hoping so. I have an SQL database and am trying to use
    frontpage as my interface. I am able to query the database fine and present
    the data on a webpage; however, I want a way to modify- add entries and such
    from the website. The question is, how do I do this within Frontpage on an
    interrelational database.

    For a simple example. I have these three tables tblstaff, tblposition,
    tblstaffposition

    tblstaff is just an sequence number for each staff, the staff's first and
    last name
    tblposition is just a sequence number and the positions
    tblstaffposition is just sequence number for staff and sequence number for
    position

    If I use the following, I get results and with modifying which fields get
    shown, I can have the results of just the staffs' names and position

    SELECT tblstaff.iseq, tblstaff.clname, tblstaff.cfname, tblposition.iseq,
    tblposition.cposition, tblstaffposition.iseqStaff,
    tblstaffposition.iseqPosition
    FROM tblstaff, tblposition, tblstaffposition
    WHERE tblstaffposition.iseqstaff = tblstaff.iseq
    AND tblstaffposition.iseqposition = tblposition.iseq

    However, I want to be able to add new staff and assign them positions within
    the webpage. THat is where I am stuck at. I can create a submittal page
    for tblstaffposition and be able to enter the sequence number for staff and
    position. But what I want to do is add a staff name and from a drop down
    list, click on position and for the webpage to add the staff member into
    tblstaff with a new sequence number and to add the staff name sequence
    number and position name sequence number into tblstaffposition

    Can someone point me in the right direction.

    --
    Robert Cohen
    A legend in his own mind
    --


    Ray at Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139