Normal Topic But I don't want to be committed! (Read 1167 times)
Blair Wettlaufer
Junior Member
Members
**
Offline


No personal text

Posts: 98
Location: Hamilton, ON
Joined: Jun 4th, 2005
But I don't want to be committed!
Nov 29th, 2006 at 3:32pm
Print Post Print Post  
Hi all,

I've got a problem that shouldn't be happening (not enough coffee this morning).

I've set up a form called "login screen" that filters access to another form on the application.  This login screen is accessed as "add data/login screen", but there are no records in this form (nor should there be).

When I hit the "enter database" button, it gives me the warning, "The current record has been changed and has not been committed to the database.  Are you sure you want to close this record?"

Now, to my mind the solution is to code for the Login Screen (on form entry) NotifyForm(1).  It doesn't seem to change the error, though.

I need the login screen to be in "Add Data" mode for some other programming.  I've done this with another database and a filtered login screen, and it works just fine -- what obvious step am I missing?

Thanks!
  

Coesper erat: tunc lubriciles altravia circum&&Urgebant gyros gimbiculosque tophi:&&Moestenui visae borogovides ire meatu:&&Et profugi gemitus exgrabuere rathae
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: But I don't want to be committed!
Reply #1 - Nov 29th, 2006 at 3:39pm
Print Post Print Post  
Are all of the elements on your Log In form Unbound?
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Blair Wettlaufer
Junior Member
Members
**
Offline


No personal text

Posts: 98
Location: Hamilton, ON
Joined: Jun 4th, 2005
Re: But I don't want to be committed!
Reply #2 - Nov 29th, 2006 at 3:57pm
Print Post Print Post  
That *is* something I forgot to do, and have now fixed.

Unfortunately, I'm still getting the same error.
  

Coesper erat: tunc lubriciles altravia circum&&Urgebant gyros gimbiculosque tophi:&&Moestenui visae borogovides ire meatu:&&Et profugi gemitus exgrabuere rathae
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: But I don't want to be committed!
Reply #3 - Nov 29th, 2006 at 4:08pm
Print Post Print Post  
Hi Blair,

Try commenting out all your programming except for the call in the "enter database" that loads the other form. If the message goes away start uncommenting the code bit by bit, and then testing until the error comes back. When it comes back look very carefully at the section that you just uncommented.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Blair Wettlaufer
Junior Member
Members
**
Offline


No personal text

Posts: 98
Location: Hamilton, ON
Joined: Jun 4th, 2005
Re: But I don't want to be committed!
Reply #4 - Nov 29th, 2006 at 4:23pm
Print Post Print Post  
Ummm ... commenting out the programming will be hard.  It's the programming that let's the form exit button work with XLOOKUPS and XPOSTS.  I'll fiddle with it and see what I can take out.

I copy and pasted the programming from another form that works just fine.  Here's my code:

Code
Select All
var vPwdChk as string
var vPwdLvl as String
var vPwdDate as string
var vFileGo as int
var vFileEntry as string

vSuccess = 0

vPwdLvl = @XLOOKUP("c:\sesame\data\ICC Staff.db",User,"ICC Staff!Col#","AccessLvl")
vPwdChk = @XLOOKUP("c:\sesame\data\ICC Staff.db",User,"ICC Staff!Col#","Password")
vPwdDate = @XLOOKUP("c:\sesame\data\ICC Staff.db",User,"ICC Staff!Col#","PwdSetDate")

if vChars = vPwdChk and vPwdLvl = @userid Then
{
	vChars=""
	vSuccess = 1

	// Write to Log file

	vFileEntry = @Newline()+"Login Successful: "+@date + " -- " + @time + " -- " + @FN + " -- " + @userid + " -- " + user
	vFileGo = fileopen("C:\sesame\logins.txt")
	if vFileGo >= 0
	{
		fileseek(vFileGo, filesize(vFileGo))
		fileWrite(vFileGo, vFileEntry)
		fileClose(vFileGo)
	}

	// Create Login ID file

	FileClose(vFileGo)
	FileDelete("C:\sesame\user.txt")
	vFileGo = fileopen("c:\sesame\user.txt")
	if vFileGo >= 0
	{
		fileseek(vFileGo, filesize(vFileGo))
		filewrite(vFileGo, ToUpper(user))
		fileclose(vFileGo)
	}

	// Check to see if password has expired or no password exists

	if (@date - 90) > vPwdDate or vPwdChk = "" then
	{
		vSuccess = 0
		@MsgBox("Password has expired!","Select a new password","Six characters in length that is alpha and numeric")
		Visibility(NewPassword,1)
		Visibility(ConfPassword,1)
		Visibility(SetPassword,1)
		Visibility(Password,0)
		ThrowFocus(NewPassword)
	}
}

if vSuccess = 1 then vSuccess = @SelectTreeItem("ICC Staff!Forms!Search/Update!Staff!ICC Staff")

If vSuccess = 0 Then
{
	vAttempts = 1 + vAttempts

	if vAttempts = 5 THEN
	{
		@MsgBox("FIVE FAILED LOGIN ATTEMPTS!","ADMINISTRATION NOTIFIED!","THIS ACCOUNT IS NOW LOCKED!")
		XPOST("c:\sesame\data\ICC Staff.db",User,"ICC Staff!Col#","LOCKED999","Password","")
		XPOST("c:\sesame\data\ICC Staff.db",User,"ICC Staff!Col#","1999/01/01","PwdSetDate","")
		vFileEntry = @NewLine() + "ACCOUNT LOCKED:    " +@date + " -- " + @time + " -- "+ @userid + " -- " + user
		vFileGo = fileopen ("C:\sesame\logins.txt")

		if vFileGo >=0
		{
			fileseek(vFileGo, filesize(vFileGo))
			fileWrite(vFileGo, vFileEntry)
			fileClose(vFileGo)
		}
		vFileGo = @sendmail("mail.nas.net"," ACCOUNT LOCKED","blair1@icc.nas.net","support@intercanadacredit.com","rick@intercanadacredit.com"," blair@intercanadacredit.com",vFileEntry)
		@DeferredMacro("C:\sesame\data\ExitMacro.mac")
	}

	// Write Failed Login to Log file

	vFileEntry = @Newline()+"Login Failed:    "+@date + " -- " + @time + " -- " + @FN + " -- " + @userid + " -- " + user + " -- Attempt " + vAttempts
	vFileGo = fileopen("C:\sesame\logins.txt")

	if vFileGo >= 0
	{
		fileseek(vFileGo, filesize(vFileGo))
		fileWrite(vFileGo, vFileEntry)
		fileClose(vFileGo)
	}

	if vChars <> vPassword Then @Msgbox("Invalid Password","Failed Login Attempts: "+vAttempts,"Try Again")
	if @userid <> vPwdLvl Then @Msgbox("User Level Incorrect","Failed Login Attempts: "+vAttempts,"Try Again")
	vChars = ""
	Clear(Password)
	ThrowFocus(Password)
}
 

  

Coesper erat: tunc lubriciles altravia circum&&Urgebant gyros gimbiculosque tophi:&&Moestenui visae borogovides ire meatu:&&Et profugi gemitus exgrabuere rathae
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: But I don't want to be committed!
Reply #5 - Nov 29th, 2006 at 4:45pm
Print Post Print Post  
Hi Blair,

Well if you can't figure it out, feel free to send the DSR and DDT files in and either me or Ben will have a look at them.

-Ray

p.s. In the interest of security, you may want to remove the line that shows what you set the password to on a failed attempt from your forum post. Another suggestion, at the beginning of that programming section, you may want to check to see if the user account has already been locked, tell the user and close sesame. This way if someone is really trying to get into your system, they really only get 5 chances with the username that they have.
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Blair Wettlaufer
Junior Member
Members
**
Offline


No personal text

Posts: 98
Location: Hamilton, ON
Joined: Jun 4th, 2005
Re: But I don't want to be committed!
Reply #6 - Nov 29th, 2006 at 4:49pm
Print Post Print Post  
Sending away!  Thanks!

I plan on replacing "LOCKED999" with a random password generator eventually.  That way only someone who can log in to the staff database as a "manager" can reset a password".

Blair
  

Coesper erat: tunc lubriciles altravia circum&&Urgebant gyros gimbiculosque tophi:&&Moestenui visae borogovides ire meatu:&&Et profugi gemitus exgrabuere rathae
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: But I don't want to be committed!
Reply #7 - Nov 29th, 2006 at 4:56pm
Print Post Print Post  
Hi Blair,

ah that makes more sense.

One of us here at Support will have a look at the file as soon as we can.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged