Community discussion forum

Creating a Members Area in ASP

This is a comment thread discussing Creating a Members Area in ASP
  • 6 years ago

    This is the most useful members area tutorial I have found so far and I've searched some, however I'm not sure if I'm going to be able to use it.


    I am using a mysql database, so is it possible to change the code to work with this. If so, what do i change (from/to). If not, does anyone know of a useful php3 tutorial, because I'm blowed if I can find one?


    cheers

  • Advertisement

    Simply the fastest line-level profiler for .NET ever

    “The low overhead means it has minimal impact on the execution of my program”
    Mark Everest, Development Team Leader, Renault F1 Team Ltd.

    Try out the new ANTS Profiler 4 for yourself. Download your 14-day trial now

  • 6 years ago

    Yes, it is. All you need to do is download the MySQL ODBC Driver from mysql.com. Then you can create an ODBC/DSN connection in windows, and your ASP script won't know the difference



    (of course, your server still needs to be able to run asp files, however...)

  • 6 years ago

    The only problem is that the server I am using (virtual server) doesn't support ODBC so I don't think there is any other way(?). I did try and use it on another site (different server, with MySQL ODBC) and I got the error:


    Vbscript Runtime error 'ASP 0185 : -2147467259'
    Data source name not found or no default driver specified


    inc-dbconnection.asp,line 14


    I used DRIVER={MySQL}, but I'm a bit confused as to what code I would need to change.


    So 2 questions really 1) What do I do on the server that doesn't support ODBC and 2) What code do I change on the one that does?!


    cheers

  • 6 years ago

    for question 1) does the server a mysql database and active server pages? What OS are they running?


    for question 2) To solve the


    Data source name not found or no default driver specified


    error, you need to create the ODBC DSN connection in the System tab rather than the User tab

  • 6 years ago

    1) Looks like it's Unix server, but from what I can gather I'm not sure they support asp(?).


    2) You'll probably have gathered that I'm pretty new at this, how do I go about this?


    cheers

  • 6 years ago

    I am having a problem updating the database I get an error:


    - An error occured. -2147217900 : Number of query values and destination fields are not the same.


    what is the problem here?




    strSQL = "INSERT INTO Personal ([username],[Password],[FName],[LName],[Street],[City],[State],[Zip],[Phone],[Birthdate]) VALUES " & _
            "('" & fixQuotes(Request.Form("username")) & "','" & _
            fixQuotes(Request.Form("Password")) & "','" & _    
            fixQuotes(Request.Form("Fname")) & "','" & _
            fixQuotes(Request.Form("LName")) & "','" & _    
            fixQuotes(Request.Form("Street")) & "','" & _    
            fixQuotes(Request.Form("City")) & "','" & _    
            fixQuotes(Request.Form("State")) & "','" & _    
            fixQuotes(Request.Form("Zip")) & "','" & _    
            fixQuotes(Request.Form("Phone")) & "','" & _    
            fixQuotes(Request.Form("Birthdate")) & "','" & "')"
           

  • 6 years ago

    I am able to get a user with the same username.  According to error 222, they are supposed to be prompted to enter a new one, this is not occuring.  PLease help

  • 6 years ago

    have you created a constraint in the database on the username field that only allows unique usernames?

  • 10 years ago

    This thread is for discussions of Creating a Members Area in ASP

  • 7 years ago

    I have been getting the following error:


    The following errors occured:
    - An error occured. -2147217900 : Syntax error in INSERT INTO statement.

  • 7 years ago

    Hi,


    I had the same problem and found out that it may a problem with reserved words, although I cannot find 'username' or 'password' in the reserved word list for 'MS Access' in my case. The solution is to place [ ] around the field names in the SQL statement.

  • 7 years ago

    Thanks for pointing that out... as I work almost entirely with SQL Server, I forget about things like that... ;-) I have added the []'s around username and password

  • 7 years ago

    Anyone knows what this file is or does (msado21.tlb). It's part of NT4 IIS4. All I know that it has something to do with Global.asa files and SQL databases.
    C:\Program Files\Common Files\System\ADO\msado21.tlb


    Thanks,


    Mo

  • 7 years ago

    If you are writing a program/dll in VB/C++ etc you can reference that type library which makes it easy to use Microsoft ADO etc....


    In Active Server Pages, you create an ADO object by using Server.CreateObject("ADODB.Connection") or whatever..

  • 7 years ago

    Hello. I tried your code for the member's only site, and it works nice, I'm having some trouble though with one aspect of it. The code says if error 222 happens, then the user would be prompted with the error message that the username in already in use, I tested it, registering one username with a password, then registering that same username again. It should've not let me register that name, but it let it go, registering the user, basically, its not checking to see if a user already existst with that name.

  • 7 years ago

    I tried this code and it does not work for me. I am using Brinkster.com web hosting, with ASP/ASP.net(ASP 3.0).


    Here are the problems I am experiencing:


    1. Register.asp allows me to register duplicate usernames, with NO error messages.
    2. Even after I register, and login.. i am not taken to the members page. No matter what I do, it says, invalid username/password!!


    Please test it out!
    Here is the address: http://www25.brinkster.com/urbanaffilntwrk/register.asp


    Please help!


    djfinesse_215@yahoo.com

  • 7 years ago

    Here's my sql statment to my Access Database to create my table for members:
    CREATE TABLE members
        (id AUTOINCREMENT PRIMARY KEY,
         [username] char(20),
         [password] char(20))


    This creates the table successfully.


    Step one is fine!


  • 7 years ago

    After i register, I get taken to the login page.. then it never lets me log in, sayin that invalid user/password!!


    I just ran a query on the db and all the info was there. I am puttin in the right info, but it neveer takes me to the member page!!!!


    Please help!!!


    I really need this member section!!!

  • 7 years ago

    Okedoke, I made a table in MS Access, uploaded it to my db directory. I am almost positive everything is right in the inc-connection.asp file. When I go to registration page, I get a Error 500 Internal Server error. It also takes a while to "open the page". Can you fill me in here anyone? I am using Brinkster.com

  • 7 years ago

    On what line does the error occur? (you may need to enable server-side debugging from the IIS console)

  • 7 years ago

    Are cookies enabled? You must have cookies enabled in order to be able to login.

  • 7 years ago

    Yes, cookies are enabled on every browser that has tried the script. It is just not working. I just tried it another machine and it still does not work.


    Finesse

  • 7 years ago

    James Crowley said:

    Quote:
    Are cookies enabled? You must have cookies enabled in order to be able to login.


    It doesn't work because they don't support session variables for general membership.


    Ok.


    Finesse

  • 7 years ago

    I want to display the name a user has used to log in on my default page. I tried using <h1><% =userid %> but it doesnt work. Can anyone tell me how to achieve this.

  • 7 years ago

    First you have to pic up the submit value of USERIG, like
    Request.querystring("Textbox name")=of the Get method or
    Request.Form("Textbox name")=of the Post method  and then you can use it like
    <%
    dim userid
    userid=Request.Form("Textbox name")
    %>


    <h1><% =userid %></h1>

  • 7 years ago

    You can set a cookie after the logging in of user. And you can display user name in all the pages. You can use hidden form fields also.

  • 7 years ago

    I too got this 500 error. I just copy all the code from the db-connection, and the access database name is testdb.


    any suggestion?

  • 7 years ago

    I'm using access 2000 db for the database. No SQL here.


    How do I add new field, like full name, email etc?
    Thanks!

  • 7 years ago

    Please can someone send me the files I need for this because I don't understand.

  • 6 years ago

    Firstly,
    I have Personal Web Manager 5.0 and IIS version 5
    I used to run ZoneAlarm but have had to remove for various reasons. I have a Pentium III with a fair chunk of RAM
    I am using W2K Also, I am running the site exclusively for myself ie 1 user.


    Heres what happened to me:
    I had worked out how to serve asp
    Things were cool, running some nice apps etc.
    Suddenly, HTTP1.0 new application failed
    I turned on "nice friendly errors" then
    http 500 internal server error
    NB I could now display only .html
    .asp was incommunicado


    I managed to get the server to display the asp files by going to the Internet Services Manager (off Administrative tools)and right-clicking on the computer name and then restarting IIS.


    PWM seems to run as normal but the IIS part has chucked a wobbly

  • 6 years ago

    Hi, im using an access database, could someone tell me how to connect to it, instead of an SQL db? for, example, what is the equivalent for:


    On Error Resume Next
    sSQL = "INSERT INTO members (username,password) VALUES " & _
      "('" & fixQuotes(Request.Form("username")) & "','" & _
      fixQuotes(Request.Form("password")) & "')"
    cConn.Execute sSQL


    cheers, Greg

  • 6 years ago

    the db-connection.asp, there were 3 lines... 1 for SQL Server, and 2 for different versions of Access:


    Code:

    '// Use this for SQL Server
    objConn.Open "Driver={SQL Server};Server=sqlservername;" & _
       "UID=username;PASSWORD=password;DATABASE=testdb;"


    '// Use this for an Access 2000 database
    objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("accessdb")


    '// Use this for an Access database (earlier than 2000)
    objConn.Open "Provider=Microsoft.Jet.OLEDB.3.51;Data Source=" & Server.MapPath("accessdb")

  • 6 years ago

    Try going to your internet service manager console and restarting your IIS under the action tab with your server highlighted.


    Cheers,


    Eugene

  • 6 years ago

    Quote:
    [1]Posted by mingteikg on 21 Dec 2001 05:07 AM[/1]
    I too got this 500 error. I just copy all the code from the db-connection, and the access database name is testdb.


    any suggestion?


    Well, firstly the 500 error is a standard error code saying there is an error in an ASP script; it's not necessarily the same one. Also, you shouldn't copy all the code into db-connection... you need to comment out some of the connection code depending on the type of database you are using.....


  • 6 years ago

    Quote:
    [1]Posted by ethai on 15 Feb 2002 02:33 PM[/1]
    Try going to your internet service manager console and restarting your IIS under the action tab with your server highlighted.


    To me, that sounds like you have not commented out the bit to connect to an SQL server; so it's sitting there for a while to decide whether the server actually exists or not, and eventually times out. Please check that you have the SQL server/ other access db code lines commented out.

  • 6 years ago

    This is the most useful members area tutorial I have found so far and I've searched some, however I'm not sure if I'm going to be able to use it.


    I am using a mysql database, so is it possible to change the code to work with this. If so, what do i change (from/to). If not, does anyone know of a useful php3 tutorial, because I'm blowed if I can find one?


    cheers

  • 6 years ago

    Yes, it is. All you need to do is download the MySQL ODBC Driver from mysql.com. Then you can create an ODBC/DSN connection in windows, and your ASP script won't know the difference



    (of course, your server still needs to be able to run asp files, however...)

  • 6 years ago

    The only problem is that the server I am using (virtual server) doesn't support ODBC so I don't think there is any other way(?). I did try and use it on another site (different server, with MySQL ODBC) and I got the error:


    Vbscript Runtime error 'ASP 0185 : -2147467259'
    Data source name not found or no default driver specified


    inc-dbconnection.asp,line 14


    I used DRIVER={MySQL}, but I'm a bit confused as to what code I would need to change.


    So 2 questions really 1) What do I do on the server that doesn't support ODBC and 2) What code do I change on the one that does?!


    cheers

  • 6 years ago

    for question 1) does the server a mysql database and active server pages? What OS are they running?


    for question 2) To solve the


    Data source name not found or no default driver specified


    error, you need to create the ODBC DSN connection in the System tab rather than the User tab

  • 6 years ago

    1) Looks like it's Unix server, but from what I can gather I'm not sure they support asp(?).


    2) You'll probably have gathered that I'm pretty new at this, how do I go about this?


    cheers

  • 6 years ago

    I can't seem to connect to my database. I have tried so many different variations of this code and nothing seems to work. The latest error i got was:


    ADODB.Connection.1 error '80004005'


    SQLState: 01S00
    Native Error Code: 0
    SQLState: 08001
    Native Error Code: 0
    [MERANT][ODBC SQL Server Driver]Insufficient information to connect to the data source
    [MERANT][ODBC SQL Server Driver]Invalid connection string attribute


    I'm using a microsoft access database and I just copied the code from this line for line, rather than trying a customisation like I did with some of the other code samples I've seen and I still couldn't get a connection.


    Does anyone know why this might be. I thought it might be because of the location of my files, but now they're all in the folder with the read/write access on my server and I still can't gain a connection.


    Any help would be appreciated!!

  • 6 years ago

    i Too am using an access database.
    I found that it is firstly better to connect using ODBC,
    Then make sure the the name you are giving to connect is exactly the same as the ODBC driver name not neccesarly the database name
    e.g of the code that works 4 me, this puts all resords and siplays in a table

    Dim adoCon        'Holds the DB connection Object
    Dim rsRecords    'Holds the recordSet for the records in the DB
    Dim strSQL        'Holds the SQL query 2 query the DB


    'Creating the ADO connection object
    Set adoCon = Server.CreateObject("ADODB.Connection")
    'Opening the connection to the DB using DSN connection
    adoCon.Open "DSN=yr6021" ' THIS IS THE NAME OF MY DB, SOCHANGE IT TO YOURS
    'Opening an ADO recordset object
    Set rsRecords = Server.CreateObject ("ADODB.Recordset")
    'Intitialising the strSQL var with an SQL statement
    strSQL = "SELECT * FROM amanihmetest1;" 'amanihmetable1.UserID, amanihme.userName, amanihmetable1.password FROM amanihme;" 'AMANIHMETST1 IS THE NAME OF MY TABLE SO U MUST CHANGE


    'now i can open the recordSet with what is in the the SQL variable
    rsRecords.Open  strSQL, adoCon


    'producing the results
    'loop
    Response.Write "<TABLE BORDER=1 CELLSPACING=3 CELLPADDING=1 >" &chr(13)
    Response.Write "<TR VALIGN=""top"" ALIGN=""left"">" &chr(13)
    For Each TheField in rsRecords.Fields
       Response.Write "<TD WIDTH=103><P><B>" & TheField.Name & "</B></TD>"
           '&chr(13)
    Next
    Response.Write "</TR>"
    Do Until rsRecords.EOF
       Response.Write "<TR VALIGN=""top"" ALIGN=""left"">" &chr(13)
           For i=0 to rsRecords.Fields.Count -1
               Response.Write "<TD WIDTH=103><P>" & rsRecords.Fields(i) & "</TD>"
           Next
       Response.Write "</TR>"
       rsRecords.MoveNext
    Loop

  • 6 years ago

    I am unable to run the login code, i seem to retrieve an unusual error.
    This occurs from the line of code
    If Request.Form("username") = "" Then _strError = strError & "- Please enter a username<br>" & vbNewLine Microsoft VBScript compilation (0x800A0408)
    Invalid character line 8

    however i am sure that the problem comes from the line above with this line of code:
    If Request.Form("action")="login" Then
    i believe this because if a put a comment in place of the line of code that generates an error, and move that line down i will then receive the error from the commented code


    PS could it be because i have a global asa, running in the same directory and that i have used IISManager to create an application oif that directory ??


    Please could some-one reply to me  

  • 6 years ago

    I know that no 1 has replied any way but i would just like to inform every 1 that there is no need to reply to my above message as i have rectified the problem..




    Thank You

  • 6 years ago

    Sorry... only just got to your post. Can I just ask what the problem was? Was it a problem with the article, or something at your end?

  • 6 years ago

    There is a great reference for ado connections in general which includes sample connection types in access www.able-consulting.com/ADO_Conn.htm

  • 6 years ago

    I am having a problem updating the database I get an error:


    - An error occured. -2147217900 : Number of query values and destination fields are not the same.


    what is the problem here?




    strSQL = "INSERT INTO Personal ([username],[Password],[FName],[LName],[Street],[City],[State],[Zip],[Phone],[Birthdate]) VALUES " & _
            "('" & fixQuotes(Request.Form("username")) & "','" & _
            fixQuotes(Request.Form("Password")) & "','" & _    
            fixQuotes(Request.Form("Fname")) & "','" & _
            fixQuotes(Request.Form("LName")) & "','" & _    
            fixQuotes(Request.Form("Street")) & "','" & _    
            fixQuotes(Request.Form("City")) & "','" & _    
            fixQuotes(Request.Form("State")) & "','" & _    
            fixQuotes(Request.Form("Zip")) & "','" & _    
            fixQuotes(Request.Form("Phone")) & "','" & _    
            fixQuotes(Request.Form("Birthdate")) & "','" & "')"
           

  • 6 years ago

    I am able to get a user with the same username.  According to error 222, they are supposed to be prompted to enter a new one, this is not occuring.  PLease help

  • 6 years ago

    have you created a constraint in the database on the username field that only allows unique usernames?

  • 6 years ago

    Sorry about yesterday


    I am getting an error after I hit submit. The error is in the inc-dbconnection.asp line 4 (Microsoft Jet error )


    What have I done wrong and can you help me?


    Thank you
    Amy



  • 6 years ago

    no problem... what's the exact error you are receiving?


  • 6 years ago

    It is now working and I didn't change anything.  I no longer receive the MS Jet error.


    Thanks

  • 6 years ago

    Almost everything seems to work except the Err.Number 222


    If I attempt to create a user name that already exists in the database, it is accepted It seems like the Err.Number 222 script is being skipped?


  • 6 years ago

    Same here. It works fine but it accepts and sends to db multiple passwords for the same user, even though it uses just the first password to give access to restricted area. The problem is that users don't even know why their password won't be valid (if they registered with a previously registered password).

  • 6 years ago

    have you created a unique constraint for the username column?

  • 6 years ago

    have you created a unique constraint on the username field? (in the database)

  • 6 years ago

    No, I didn't even think of that.


    Thanks

  • 6 years ago

    ??


    Do I create this unique constraint in the Design view of the database? And,if so, will changing the "INDEXED" to Yes - no duplicates solve the problem?


    Is that all I hvae to do or is there more to it than that?


    Thanks

  • 6 years ago

    yep; no duplicates will be fine. In access, you may also have to change the error number that the code traps

  • 6 years ago

    Are you talking about changing the acess error number Or the error number in the asp form?
    How do I, in Access, change the error number that the code traps?  
    Or
    Is there another way to set the unique constraint in access?


    Sorry for all of the questions.

  • 6 years ago

    The


    If Err.Number = 222 Then


    line.... it may not be error 222 for access .... just try to create a duplicate username and see what error # occurs

  • 6 years ago

    Thank you for all of your help!  It works great.


    I would like to add the users name to the Memebers (default asp) page.  So it reads Welcome Who ever to the members area


    How can I do that?


    Thanks

  • 6 years ago

    Hi James,
    I am not a programmer. I have been studying ASP for less than one year. I guess you are talking about the databank, whemn you mention colum constraining. I will look into that. Thanks a lot.



    Some minutes later... I changed the properties of username column. I got it. I just had to change the erro number to show the right message. Instead of 222 I used the number that appeared on my screen: -2147467259 ( it  looks more like an international phone number... anyway... I hope this isn't just that session number.)
    Thanks again.

  • 6 years ago

    hey,


    simple. I just had a brief look at the Code.


    Heres something you can do:
    Insert a field onto the registration form to get the users name(referenced as here as: 'fullname') then in the register.asp(i think thats teh filename) add:


    sSQL = "INSERT INTO members (username,password,fullname) VALUES " & _
      "('" & fixQuotes(Request.Form("username")) & "','" & _
      "('" & fixQuotes(Request.Form("password")) & "','" & _
      fixQuotes(Request.Form("fullname")) & "')"


    then load the fullname into a session variable like this:
    Session("fullname")= objRS("fullname")



    then you can add a simple ASP retrieve statement to retrieve the name inserted into the field anyhwere on the site like this:


    Welcome <%= Session("fullname")%>


    Hope that Helps!

  • 6 years ago

    i also forgot to tell you some other things:


    You will need to create the 'FullName' field in the database, and also you will need to insert the session assigning code somewhere in the following code:


    If objRS("password")=Request.Form("password") Then
                  'username/password valid
                  'save session data


    so after the 'Save Session Data' would be an ideal place.

  • 6 years ago

    When i want to add a member to my website on the internet i get the following message,


    The following errors occured:
    - An error occured. -2147467259 : Operation must use an updateable query


    It works nicely when I test it on my computer, but when I publish it to my URL, I get this error.  What can be the problem.


    Sipes

  • 6 years ago
    • An error occured. 500 : Variable is undefined


    I am very blank in asp.


    could somebody help me on this???

  • 6 years ago

    this is a long shot as i dont know nything bout asp, but variable undefined means ure using a


    var = var1


    or something similar, and u havnt statedwhat var is ie, to overcome this in vb i just put


    Dim var


    var = var1


    probably totally out for asp but worth a shot lol

  • 6 years ago



    Look At :
    http://support.microsoft.com/search/preview.aspx?scid=kb;en-us;Q307640


    SYMPTOMS
    If you try to use a Microsoft Jet (Access) database from multiple instances of the same application either on the same computer or on different computers, you receive the following error message:


    -2147467259 Error ODBC Microsoft Access Driver: The database has been placed in a state by an unknown user that prevents it from being opened or locked.
    This error occurs with both the Microsoft ODBC Driver for Access and the OLE DB Provider for Jet.




    CAUSE
    To run an .mdb file by multiple instances, Jet makes use of a lock delay and retry interval. However, under high load conditions, you may exceed these intervals.




    RESOLUTION
    Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact a Microsoft Certified Partner or the Microsoft fee-based consulting line at (800) 936-5200. For more information about Microsoft Certified Partners, please visit the following Microsoft Web site:


    http://www.microsoft.com/partner/referral/
    For more information about the support options that are available and about how to contact Microsoft, visit the following Microsoft Web site:
    http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS
    The following workaround extends the retry delay for Jet so that you can use additional instances. However, it is not recommended that you use this workaround if a high number of updates are being formed; this workaround is intended only for reading databases.


    You can add the following sample error handler to your code. Please note that this handler only works with ADO and uses the Sleep function, which you must declare in your general declarations section.
    RetryHandler:
    ' Retry until MAXRETRIES are hit to increment your error count.
    errorcount = errorcount + 1
    If errorcount < MAX
    RETRIES Then
       Randomize 0
    ' Sleep a random amount of time, and retry the same operation.
       Sleep Int(MAXSLEEPINTERVAL * Rnd) + 1
       Resume
    Else
    ' Retries did not help. Show the error, and fall out.
       MsgBox Err.Number & " " & Err.Description
       Exit Sub
    End If




    STATUS
    This behavior is by design.




    MORE INFORMATION
    The above-mentioned workaround is only for read-only mode. Microsoft does not support placing Jet .mdb files under high user load. Microsoft strongly recommends that you use Microsoft SQL Server or Microsoft Data Engine (MSDE) instead of Access when high user loads (that is, more than 15 instances) are required or anticipated, especially when updating is required.




    REFERENCES
    For more information regarding the Sleep function, refer to the MSDN Library documentation.




    Published Oct 2 2001 8:12AM  Issue Type kbprb  
    Last Modifed May 13 2002 6:53AM  Additional Query Words -2147467259  
    Keywords kberrmsg kbGrpDSVBDB kbGrpDSMDAC kbDSupport  




    COMMENTS?

  • 6 years ago



    I believe this is more applicable....
    PRB: ASP Error "The Query Is Not Updateable" When You Update Table Record (Q174640)



    The information in this article applies to:



    Microsoft Active Server Pages
    Microsoft Visual InterDev, versions 1.0 , 6.0
    ActiveX Data Objects (ADO), versions 2.0 , 2.1 SP2 , 2.5 , 2.6 , 2.7
    Microsoft Internet Information Server versions 4.0 , 5.0
    Microsoft Data Access Components versions 2.5 , 2.6 , 2.7






    SYMPTOMS
    One of the following errors occurs when you update a table record from an Active Server Pages (ASP) page through ADO's Recordset.update method:


    Source: Microsoft OLE DB Provider for ODBC Drivers
    Error Number: -2147467259
    Description: The query is not updateable because the from clause is
    not a single simple table name. This may be caused by an attempt to
    update a non-primary table in a view.
    -OR-
    Microsoft OLE DB Provider for ODBC Drivers error '80004005'
    [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name
    '<a column from your table>'.
    /<your asp file>.asp, line xxx
    -OR-
    Microsoft OLE DB Provider for SQL Server '80004005' Cannot insert or update columns from multiple tables.
    -OR-
    Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype.




    CAUSE
    The following conditions cause this error to occur:


    You have created a query that contains more than one table.



    You are updating the records returned by this query and the update affects fields in more than one table.



    Basically, if the query involves tables that have a one-to-many relationship, the query -as a whole- is not updateable.




    RESOLUTION
    Process one table's fields independently from another. Issue an Update after each table's fields have been modified. For example, in the code sample below, the "cmdTemp.CommandText" property holds the one-to-many query and the fields of parent table are updated independently of the child table.


      <Object creation code removed for clarity>
                    .
                    .
                    .
      cmdTemp.CommandText = "SELECT stores.state, sales.qty FROM sales INNER
      JOIN stores ON sales.storid = stores.storid"
                    .
                    .
                    .
      'update parent table first
      Datacommand1("state")="WA"
      Datacommand1.update


      'now update child table
      Datacommand1("qty")=4
      Datacommand1.update




    STATUS
    This behavior is by design.




    REFERENCES
    For the latest Knowledge Base artices and other support information on Visual InterDev and Active Server Pages, see the following page on the Microsoft Technical Support site:


    http://support.microsoft.com/support/vinterdev/




    Published Oct 2 1997 7:11PM  Issue Type kbprb  
    Last Modifed Aug 23 2001 8:24AM  Additional Query Words  
    Keywords kberrmsg kbASP kbASPObj kbDatabase kbODBC kbOLEDB kbVisID kbVisID100 kbGrpDSASP kbGrpDSMDAC kbDSupport kbMDAC210SP2 kbMDAC250 kbiis400 kbiis500 kbGrpDSASPDB kbADO250 kbMDAC260 kbADO260 kbATM kbmdac270 kbado270  



  • 6 years ago

    i didnt read all of what GeoRod said but basically the cut down for the problem is that the DATABASE permissions need ot be changed.


    Why does it happen? Well when you open a MDB(Access Format) it creates a tmeporary file(try it your self and you'll see something like lld or something file appaering) so on your webserver you will need to allow the DB to 'create' that file.


    What server is it running?(IIS i guess but never the less) just ask your admin/support team about changeing the permissions on the folder where the location of the DB is located to make sure its got write permission.


    If you have it hosted on local system just right click on teh explorer's folder options and under Security and turn to the relavent field.


    Hope that helps.

  • 6 years ago

    Is there another way to display the error message?  


    I want my Window to be of a fixed size (and the text box is in a table). It seems because of this... the str.Err message won't appear.  


    Can I display the str.error message in another text box? something like.... if you had another text box next to the Subject  text box on this screen.


    Thanks,


    Amy-

  • 6 years ago

    I have set up the members area but when you try to login you get this error

    Code:

    Response object error 'ASP 0156 : 80004005'


    Header Error


    /members/login.asp, line 44


    The HTTP headers are already written to the client browser. Any HTTP header modifications must be made before writing page content.



    What should i do?

  • 6 years ago

    ADODB.Connection.1 error '80004005'


    SQLState: 01S00
    Native Error Code: 0
    SQLState: 08001
    Native Error Code: 0
    [MERANT][ODBC SQL Server Driver]Insufficient information to connect to the data source
    [MERANT][ODBC SQL Server Driver]Invalid connection string attribute



    inc-dbconnection.asp, line 14


    I am getting this error after clicking the submit button on the register page. My datbase is saved as testdb.mdp fill. Is that right? Any ideas woul be great plz.

  • 6 years ago

    I don't think the inc-dbconnection.asp is set-up right. I copied it straighr of the page and on to the site (didn't adjut it). I am using an Access 2000 database, which i also uploaded to the same place as the other .asp files.

  • 6 years ago

    Microsoft VBScript compilation error '800a0400'


    Expected statement


    inc-dbconnection.asp, line 6


    accessdb = this is the url i link to the database i put here


    Now getting this above error.


  • 6 years ago

    I can signup, i've fixed the 222-error but when i try to login i'm getting the following error (in login.asp) :



      HTTP 500.100 - Internal Server Error - ASP error
      Internet Information Services

      --------------------------------------------------------------------------------

      Technical Information (for support personnel)

      Error Type:
      Microsoft JET Database Engine (0x80040E10)
      No value given for one or more required parameters.
      /login.asp, line 31



    Line 31 is:


      Set objRS = objConn.Execute (strSQL)



    So default.asp isn't displayed
    What am i doing wrong?


    Thnx in advance!

  • 6 years ago

    I have read the code ....but i am not able to understand what this fixQuotes is. I have also designed a code for reg. but i have a problem in that too. The query which I am firing to check wether the user name already exists or not is not taking the appro. action. The problem is that its always going to the same procedure which i have writen in vbscript. Also if the user is reg. for first time. Help me if u can.
    Mail me at aalokcool@yahoo.com

  • 6 years ago

    how the heck do you display details that are unique to each member eg: their email address, their last posts, points they may have acquired etc.  sorry if it may sound like a dumb question but if you could let me know I'd really appreciate it. Thanks, Rich: richardgillian@hotmail.com

  • 6 years ago

    i have created members area from your instruction.
    but my database(members) is receiving same usernames.
    So i think 222 error function does not exist . please suggest me.
    and check my script


    222 error function


    If Err.Number = 222 Then
             strError = "- That username is already in use. Please choose another<br>" & vbNewLine
         ElseIf Err.Number <> 0 Then
             strError = "- An error occured. " & Err.Number & " : " & _
                 Err.Description & "<br>" & vbNewLine
         Else
             'record created... redirect
             Response.Redirect "login1.asp?msg=" & Server.URLEncode("Thank you for registering")
             Response.End
         End If


         'restore standard error handling
         On Error Goto 0



                                                                             reply me soon(smruti2002)

  • 6 years ago

    I have been using just the login section of your code, and as I have been adding members to the Access database manually it works perfectly - members can log in without any trouble. I have decided to use the full code now so new members can add themselves, but I have been getting this error:


    - An error occured. -2147467259 : Operation must use an updateable query.


    I guess it's something to do with the Accsess database but I don't know much about it. I am using Access from Office XP. Can you please help?


    Thanks  : )

  • 6 years ago

    This is awesome! I actually got this to work! When I come back from the login.asp I send them to page where I want to display the results of a query against an Access database showing the products they have already bought. I want to pass in the populated username variable from the register.asp page and either run the query when the page loads or run it off a button click. How do I work with the username variable in this and other pages I might redirect them to?? Thanks so much! I have been laboring at this project for weeks before finding your tutorial.

  • 6 years ago

    this sounds interesting. How do I make sure my cookie is populated and how do I reference it or use in other pages as a variable name? say for filtering the results of a query?? Thanks.

  • 6 years ago

    filtering is usually done using a QueryString these are the part in the url after the "?"


    http://www.developerfusion.com/forums/post.aspx?tid=3460
                                                                      &n