+ Reply to Thread
Page 3 of 3 FirstFirst 1 2 3
Results 21 to 28 of 28

Thread: mdb to SQL SERVER

  1. #21
    Contracted Slave Centurion is on a distinguished road Centurion's Avatar
    Join Date
    Dec 2008
    Posts
    533
    Rep Power
    4

    Quote Originally Posted by micky View Post
    koi baat nahi, chalne lagegi, chinta mat kar

    You need to check if your recordset has a record or not, before you can read its value like rs("password").
    So add such code
    Code:
    If NOT rs.BOF and NOT rs.EOF
     If oldpassword = "" Or newpassword = "" Then
      Response.Write "Make sure password is valid and fill all the fields please!"
     ElseIf rs("password") <> oldpassword Then
      Response.Write "Wrong password inserted!"
     ElseIf newpassword <> confirmpassword Then
      Response.Write "Confirm password and new password are not the same!"
     ElseIf oldpassword = newpassword Then
      Response.Write "Old password and new password are the same!"
     Else
        
        sql = "UPDATE mem SET password = '" & newpassword & "' WHERE " _
      & "username = '" & Request.Form("username") & "'"
    
      conn.Execute(sql)
      Response.Write "Your Password has been changed!"
     End If
     End If
    rs.Close
     Set rs = Nothing
     conn.Close
     Set conn = Nothing
    'End If
    
    you mean?
    Code:
    If NOT rs.BOF and NOT rs.EOF Then
    
    i have done this and no errors come up but it doesnt seem to change the password.. khalas khatum hoi gya!!!

  2. #22
    Lazy Bum micky is a jewel in the rough micky is a jewel in the rough micky is a jewel in the rough micky is a jewel in the rough micky's Avatar
    Join Date
    Jul 2008
    Location
    India
    Posts
    1,758
    Blog Entries
    2
    Rep Power
    8

    You need to learn to debug

    Debug and see if its going in IF loop or not and if going, then in which IF loop does it go!

  3. #23
    Contracted Slave Centurion is on a distinguished road Centurion's Avatar
    Join Date
    Dec 2008
    Posts
    533
    Rep Power
    4

    Quote Originally Posted by micky View Post
    You need to learn to debug

    Debug and see if its going in IF loop or not and if going, then in which IF loop does it go!
    it checks to see if its EOF and its not so then it goes through.. then crashes at password. thats as far as i can debug.. what else can i do?

  4. #24
    Lazy Bum micky is a jewel in the rough micky is a jewel in the rough micky is a jewel in the rough micky is a jewel in the rough micky's Avatar
    Join Date
    Jul 2008
    Location
    India
    Posts
    1,758
    Blog Entries
    2
    Rep Power
    8

    after the eof line, print the password and see what it brings from database.

  5. #25
    Contracted Slave Centurion is on a distinguished road Centurion's Avatar
    Join Date
    Dec 2008
    Posts
    533
    Rep Power
    4

    Quote Originally Posted by micky View Post
    after the eof line, print the password and see what it brings from database.
    as i sed before it just goes to the end if and displays no error..


    If NOT rs.BOF and NOT rs.EOF Then
    response.write rs("password")
    response.end

  6. #26
    Lazy Bum micky is a jewel in the rough micky is a jewel in the rough micky is a jewel in the rough micky is a jewel in the rough micky's Avatar
    Join Date
    Jul 2008
    Location
    India
    Posts
    1,758
    Blog Entries
    2
    Rep Power
    8

    If its not going inside IF loop, then probably you dont have such record in database.

  7. #27
    Contracted Slave Centurion is on a distinguished road Centurion's Avatar
    Join Date
    Dec 2008
    Posts
    533
    Rep Power
    4

    Quote Originally Posted by micky View Post
    If its not going inside IF loop, then probably you dont have such record in database.
    i do have those records!!

  8. #28
    Lazy Bum micky is a jewel in the rough micky is a jewel in the rough micky is a jewel in the rough micky is a jewel in the rough micky's Avatar
    Join Date
    Jul 2008
    Location
    India
    Posts
    1,758
    Blog Entries
    2
    Rep Power
    8

    Quote Originally Posted by wbva View Post
    i do have those records!!
    Ok, response.write your query and copy that query in your database's query analyzer and see what does it returns!!

    As i said, its all debugging now.

+ Reply to Thread
Page 3 of 3 FirstFirst 1 2 3

Similar Threads

  1. SQL Server Integration Services
    By guddu in forum Microsoft SQL Server
    Replies: 1
    Last Post: April 24th, 2009, 08:08 AM
  2. SQL Server CREATE TABLE..LIKE
    By Wolffy in forum SQL Code Samples
    Replies: 2
    Last Post: March 12th, 2009, 05:51 PM
  3. SQL Server 2008
    By stephenhy88 in forum Microsoft SQL Server
    Replies: 7
    Last Post: August 13th, 2008, 02:55 AM
  4. SQL Server Views
    By theChris in forum Microsoft SQL Server
    Replies: 3
    Last Post: March 23rd, 2008, 08:35 PM

Bookmarks

Posting Permissions

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

SEO by vBSEO