Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Logging In


apologise, I know this is a very simple question, but I am only a beginner!
Take the following code:

Do
mSQL = "Select UserName from Employees where UserName = '" & strUserName & "'"
Set RS = Conn.Execute(mSQL)
If RS.EOF Then
iResponse = MsgBox("Please re-enter Username", vbExclamation, "Invalid Username")
End If
Loop Until strUserName <> ""




If strUserName <> "" Then
Form6.Show
Form1.Hide
End If


'ensuring password is correct
sSQL = "Select Password from Employees where Password = '" & strPassword & "' AND UserName = '" & strUserName & "'"

Do
Set RS = Conn.Execute(sSQL)
If RS.EOF Then
iResponse = MsgBox("Please re-enter password", vbExclamation, "Invalid Password")
End If
Loop Until strPassword <> ""

If strPassword <> "" Then
Form6.Show
Form1.Hide
End If

The result is that the system logs me on regardless, yet still displays the warning message boxes!
What am i doing wrong?
Thank you!




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Help Logging
hi all, im trying to connect to my PhpMyadmin remote server. now it requires username password

here is the source code of my http://IP/phpmyadmin/index.php:


HTML Code:
<?xml version="1.0" encoding="utf-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<link rel="icon" href="./favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
<title>phpMyAdmin 2.7.0-pl2</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<base href="http://212.227.132.70/phpmyadmin/" />
<link rel="stylesheet" type="text/css" href="./css/phpmyadmin.css.php?lang=en-utf-8&amp;server=1&amp;js_frame=right" />
<link rel="stylesheet" type="text/css" href="./css/print.css?lang=en-utf-8&amp;server=1" media="print" />
<script language="javascript" type="text/javascript">
<!--
// show login form in top frame
if (top != self) {
window.top.location.href=location;
}
//-->
</script>
</head>

<body bgcolor="#F5F5F5">


<center>
<a href="http://www.phpmyadmin.net" target="_blank"><img src="./themes/original/img/logo_right.png" id="imLogo" name="imLogo" alt="phpMyAdmin" border="0" /></a>
<h2>Welcome to phpMyAdmin 2.7.0-pl2</h2>

<!-- Language selection -->
<form method="post" action="index.php" target="_top">
<input type="hidden" name="server" value="1" />
<table border="0" cellpadding="3" cellspacing="0">
<tr>
<td><b>Language:&nbsp;</b></td>

<td>
<select name="lang" dir="ltr" onchange="this.form.submit();">


<option value="en-iso-8859-1">English (en-iso-8859-1)</option>
<option value="en-iso-8859-15">English (en-iso-8859-15)</option>
<option value="en-utf-8" selected="selected">English (en-utf-8)</option>
<option value="he-iso-8859-8-i">Hebrew (he-iso-8859-8-i)</option>
<option value="he-utf-8">Hebrew (he-utf-8)</option>
<option value="mn-utf-8">Mongolian (mn-utf-8)</option>
<option value="ru-cp-866">Russian (ru-cp-866)</option>
<option value="ru-koi8-r">Russian (ru-koi8-r)</option>
<option value="ru-utf-8">Russian (ru-utf-8)</option>
<option value="ru-win1251">Russian (ru-win1251)</option>
<option value="tr-iso-8859-9">Turkish (tr-iso-8859-9)</option>
<option value="tr-utf-8">Turkish (tr-utf-8)</option>
<option value="uk-utf-8">Ukrainian (uk-utf-8)</option>
<option value="uk-win1251">Ukrainian (uk-win1251)</option>
</select>
<input type="submit" value="Go" />
</td>

</tr>


</table>
</form>
</table>
</form>
<br />
<!-- Login form -->
<form method="post" action="index.php" name="login_form" target="_top">
<table cellpadding="3" cellspacing="0">
<tr>
<th align="left" colspan="2" class="tblHeaders" style="font-size: 14px; font-weight: bold;">Log in</th>

</tr>
<tr>
<td align="center" colspan="2" bgcolor="#E5E5E5">(Cookies must be enabled past this point.)</td>
</tr>
<tr>
<td align="right" bgcolor="#E5E5E5"><b>Username:&nbsp;</b></td>
<td align="left" bgcolor="#E5E5E5">
<input type="text" name="pma_username" value="root" size="24" class="textfield" onfocus="this.select()" />

</td>
</tr>
<tr>
<td align="right" bgcolor="#E5E5E5"><b>Password:&nbsp;</b></td>
<td align="left" bgcolor="#E5E5E5">
<input type="password" name="pma_password" value="" size="24" class="textfield" onfocus="this.select()" />
</td>
</tr>


<tr>
<td colspan="2" align="right">
<input type="hidden" name="server" value="1" />
<input type="hidden" name="lang" value="en-utf-8" />
<input type="hidden" name="convcharset" value="iso-8859-1" />
<input type="submit" value="Log in" id="buttonYes" />
</td>
</tr>
</table>

</form>
</center>

<script type="text/javascript" language="javascript">
<!--
var uname = document.forms['login_form'].elements['pma_username'];
var pword = document.forms['login_form'].elements['pma_password'];
if (uname.value == '') {
uname.focus();
} else {
pword.focus();
}
//-->
</script>


</body>

</html>
ive tried to login with Winsock with this:


Code:
Function Login(ByVal lUsername As String, lPassword As String)
wnslogin.RemoteHost = "212.227.132.70"
wnslogin.RemotePort = 80
strPost = "pma_username=" & "root" & "&pma_password=" & """"
strHTTP = "POST /phpmyadmin/index.php HTTP/1.0" & vbCrLf
strHTTP = strHTTP & "Host: " & "212.227.132.70" & vbCrLf
strHTTP = strHTTP & "Content-Type: application/x-www-form-urlencoded" & vbCrLf & "Content-Length: " & Len(strPost) & vbCrLf
strHTTP = strHTTP & "User-Agent: MyAgent" & vbCrLf
strHTTP = strHTTP & vbCrLf
strHTTP = strHTTP & strPost
wnslogin.Connect
Do While wnslogin.State <> sckConnected
DoEvents
Loop
wnslogin.SendData strHTTP
End Function

Private Sub wnslogin_DataArrival(ByVal bytesTotal As Long)
wnslogin.GetData Data, vbString
Debug.Print Data
End Sub
but no luck here
and the same is with the INET

Code:
Call Inet1.Execute(Inet1.URL, "POST", "pma_username=Root")
Call Inet1.Execute(Inet1.URL, "POST", "pma_password=""""")
Call Inet1.Execute(Inet1.URL, "POST", "Log in")
Text = Inet1.GetChunk(65535, icString)
no luck here too.
can anyone please help me, how do i login to my server?

Logging In With VB
I am creating a program for school in Visual Basic 6. The first screen that comes up is a login screen. I have created an access database to store these values. I have created an Adodc to link access to VB. I created a login button that when I click it I want it to check if the username and password is in the database, if not a msgbox will appear.

I am not new at programming in VB but I am new with database in VB

Any help with be appreciated. Thanks

Help Logging In
I'm trying to log into my AdminCP via VB6, but I can't seem to get it to work. Here's the HTML


HTML Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>
<link rel="shortcut icon" href="/favicon.ico">
<title>Plesk</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<script language="javascript" type="text/javascript" src="/javascript/common.js?plesk_version=psa-7.5.4-75060618.12"></script>
<script language="javascript" type="text/javascript" src="/javascript/chk.js.php"></script>

<link rel="stylesheet" type="text/css" href="/skins/winxp.new.compact/css/general.css">
<link rel="stylesheet" type="text/css" href="/skins/winxp.new.compact/css/main/custom.css">
<link rel="stylesheet" type="text/css" href="/skins/winxp.new.compact/css/main/layout.css">
<link rel="stylesheet" type="text/nonsense" href="/skins/winxp.new.compact/css/misc.css">


<script type="text/javascript">
<!--
function _body_onload()
{
loff();
SetContext('login_up');

setFocus();
}

function _body_onunload()
{
lon();

}


var opt_no_frames = false;
var opt_integrated_mode = false;

function locale_oC(f1, f2)
{
if ("default" == f2.locale.value)
return;
f2.login_name.value = f1.login_name.value;
f2.submit();
}

function login_oC(f1, f2)
{
if ((f1.login_name.value == "") || (f2.passwd.value == "")) {
alert("Enter your login name and password.");
f1.login_name.focus();
f1.login_name.select();
return false;
}
f2.login_name.value = f1.login_name.value;
f2.submit();
return false;
}

function setFocus()
{
if (o = document.forms[0].login_name) {
o.focus();
o.select();
}
}

function get_password_oC(f1, f2)
{
f1.login_name.value = f2.login_name.value;
f1.submit();
}

//-->
</script>
</head>
<body onLoad="_body_onload();" onUnload="_body_onunload();" id="mainCP" class="">
<a href="#" name="top" id="top"></a>
<table border="0" cellspacing="0" cellpadding="0" id="loaderContainer" onClick="return false;"><tr><td id="loaderContainerWH"><div id="loader"><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td><p><img src="/skins/winxp.new.compact/icons/loading.gif" height="32" width="32" alt=""/><strong>Please
wait.<br>Loading ...</strong></p></td></tr></table></div></td></tr></table>
<table width="100%" cellspacing="0" cellpadding="0" border="0"><tr><td id="screenWH">
<div class="screenBody" id="login">
<div class="formArea">
<table cellspacing="0" cellpadding="0">

<tr><td id="loginTitle">Login To Plesk 7.5 Reloaded</td></tr>

<tr><td id="loginForm">

<p>Enter the login name into &quot;Login&quot; and password into the &quot;Password&quot;
fields respectively. Then click &quot;Login&quot;.</p>

<form name="form1" action="/login_up.php3" method="post" onSubmit="if ((document.forms[1]) && (!document.forms[1].passwd.value)) document.forms[1].passwd.focus(); return false;">
<table class="formFields" cellspacing="0" width="100%">
<tr>
<td class="name"><label for="login_name"> Login</label></td>
<td><input type="text" name="login_name" id="login_name" value="" size="25" maxlength="501" tabindex="1"></td>
</tr>
</table>
</form>

<form name="form2" action="/login_up.php3" method="post" onSubmit="return login_oC(document.forms[0], document.forms[1])">
<table class="formFields" cellspacing="0" width="100%">
<tr>
<td class="name"><label for="passwd"> Password</label></td>
<td><input type="password" name="passwd" id="passwd" size="25" maxlength="14" tabindex="2"></td>
</tr>

<tr>
<td class="name"><label for="fid-locale">Interface language</label></td>
<td><select name="locale" id="fid-locale" onChange="locale_oC(document.forms[0], document.forms[1])"><option value="default" SELECTED>
User default</option>
<option value="en-US">ENGLISH (United States)</option>
</select>
</td>
</tr>
</table>

<input type="hidden" name="login_name" value="">
</form>

<div class="formButtons">
<form name="form3" action="/get_password.php" method="post">
<table width="100%" cellspacing="0"><tr>
<td class="main" id="get_password">
<input type="hidden" name="login_name" value=""><a href="#" onClick="return get_password_oC(document.forms[2], document.forms[0]);">
Forgot your password?</a>
</td>
<td class="misc"><div class="commonButton" id="bid-login" title="Login" onclick="return login_oC(document.forms[0], document.forms[1]);return false" onmouseover="mouse_move('b_login')" onmouseout="mouse_move()"><button name="bname_login" tabindex="3">
Login</button><span>Login</span></div></td>
</tr></table>
</form>
</div>

</td></tr>
</table>
</div>

</div>
</td></tr></table>
</div>
</body>

<script type="text/javascript">
try {
lsetup();
} catch (e) {
}
</script>
</html>

This is the code I'm using:


Code:
Private Sub Command1_Click()

wb2.Document.All("login_name").Value = "user"
wb2.Document.All("psswd").Value = "pass"
wb2.Document.Forms(0).Submit
End Sub

Logging
Hello,
i have the following problem :

i have a winsock connection established to a game server, now at some point it will recieve the command 'Login' from the game server.. after it recieves that , i want it to log the next 5 packets the winsock sends to the game server ( its a proxy, so no , i have to READ what the program is gonna send )..
so in short :

1. Wait till it recieves 'Login' from the connected game server.

2. Log the next 5 packets the WINSOCK is going to send TO the game server.

3. Save those 5 packets in 1 variable

If theres anything im unclear about, please tell me..
Thanks for your help ,
Jeroen van Vierzen

PS:
I know it contains the word WINSOCK a lot, but in fact the basic problem fits more in general then in Winsock ( since communications section is more spend to the Connecting type of questions )
:P thx

Logging Off
I am doing a login form and use this code



Code:
Me.Hide
Timez = Format(Now, "hh:mm:ss AM/PM")
Monthz = Month(Now) & "/" & Day(Now)
dashz = "-------------------------------------"

Open App.Path & "login.txt" For Append As #1
Write #1, Timez
Close #1
Open App.Path & "login.txt" For Append As #2
Write #2, Monthz
Close #2
Open App.Path & "login.txt" For Append As #2
Write #2, dashz
Close #2

But i also wanted a log off from, how do i do it? I added


Code:
private sub form_unload (Cancel as integer)

but it seems cannot. How>

Key Logging
In my program i need to log the keys of a user, but the tricky part is, i need to log the keys when is typing caracters in an other application. E.G A user is typing a thing in Word then my program has to log the keys the user is pressing, i hope u all understand my question.

Anyway i give u all my regards.

Xp Logging
I was to make a program that is going to run every time somebody logs on. Im using windows Xp home edition. How do I retrieve the information of who is currently logged on, and at what time. Is this name in the registry? If so, how do I get it with vb?

Thanks in advanced!

Logging On
I am new to Visual Basic, how do you compare a value entered in a text field (eg password) and a value held in a field of a table in an Access DB to ensure they are the same?
Thank you!
m

Logging In With API
Hi People!

I am having trouble finding a decent login API for win95 or winNT. It should check the domain and let them login if they are a registered user. Does anyone know of an API that does some or all of this? If not is there any other way of doing it?
Thanks.

Logging..
Does anyone have or know of a code that will take all of your VB actions or what VB does at all and will log it to a text file? Everytime something happens, it will append the data to the file, just keep adding to the log?

I ask because a team and I built a Master Control system for a TV station in VB and we are required by Government Regulation to keep a log of everything that happens with Master Control.

VB6 Logging
Hello everyone,im currently working on a program for monitoring cpu usage,bandwith,current processes open etc.It's for monitoring servers.I got a simple logging system going but im wondering how i would get it to not overwrite the already existing line.Hope you understand me.Thank you for your time.

Logging In Help?
Ok, so I'm trying to create a program that will login into a site via vb. Now i was trying to use this post: http://www.vbforums.com/showpost.php...0&postcount=11 as a refrenece, I got everything to work, except I found out that the page I'm logging into has two login forms. So i think the program is " confused" in which form to fill out and which form to submit.

The url I'm tryting to login in would be: http://my.gamebattles.com/login

If you could help, that would be awesome

Logging
hi there


first off kinda new to vb, taken my time to read around the forum so i hope im posting in the right place!

Im wondering is it possible to write abit of vb script to log specifically other vb programs?

so for example xxx program logged at date/time to a txt file


alternatively log a program based on size i.e 5.678 bytes acessed on etc etc date/time dumped again to a txt file.?


if theres already a simliar script about that someone knows of could u point me in the direction


many thnxs guys

Logging In
gud day ^_^

just want to ask how can i prevent a user account to be login multiple times at the same time? ex. if the user admin is currently log in the system, no other user in the network can use that account as long as that account is still log.

im thinking of making a column in my database named status and through that, the status of the user will be checked if the user is currently log in or not.

any other idea?

Need Help With Logging.
I have an error handler put into my code and that logs just fine but how do I just log stuff normally?

For example, I just copied a bunch of files to a directory so I want to log all the ones that I just copied.

Logging On To Web
hi I am trying to log on to a web page through my program using this code:

Private Sub Command1_Click()

'WebBrowser1.Navigate
WebBrowser1.Navigate ("http://www.mysite.com/")
Do Until WebBrowser1.ReadyState = READYSTATE_COMPLETE
DoEvents
Loop
WebBrowser1.Document.Forms(0).uname.Value = Text1.Text
WebBrowser1.Document.Forms(0).uemail.Value = Text2.Text
WebBrowser1.Document.Forms(0).psword.Value = Text3.Text
WebBrowser1.Document.Form(0).submit

End Sub

but I am getting error at this line: WebBrowser1.Document.Form(0).submit

it just wont submit, the ollowing code is from the we page source:
<td align="center"><font color="black">Username:</font></td>
</tr>
<tr>
<td align="center"><input class="login_input" type="text" name="uname" value=""></td>
</tr>
<tr>
<td align="center"><font color="black">Email:</font></td>
</tr>
<tr>
<td align="center"><input class="login_input" type="text" name="uemail" value=""></td>
</tr>
<tr>
<td align="center"><font color="black">Password:</font></td>
</tr>
<tr>
<td align="center"><input class="login_input" type="password" name="psword"></td>
</tr>
<tr>
<td align="center" style="padding-top: 5px;"><input class="login_input" type="submit" value="Login" style="width: 50px;"></td>
</tr>
</table>
<input type="hidden" name="hash" value="e97be0c74dd6e21be069e57c7fe40c9a">

Logging In
im trying to do a log in for for my vb system. there will be a choice of two usernames from a combo box and the password is created else where. Unfortunatley it wont work for me it keeps producing the final msgbox (i.e unauthorised login).
Here is the code i have, i am probably missing something easy.
Private cn1 As New ADODB.Connection
Private rs As New ADODB.Recordset
Private cmd As New ADODB.Command

Private Sub cmdenter_Click()

cn1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=H:Development
ooney.mdb"
cn1.Open
rs.Open "select * from users", cn1, adCmdTable
cn1.CursorLocation = adUseClient
cmd.ActiveConnection = cn1

Dim pass As String
Dim username As String
Dim correctlogin As Integer

username = Combouser.Text
pass = txtpass.Text

rs.MoveFirst
Do While rs.EOF = False

If username = rs("Username") And pass = Trim(rs("Password")) Then
correctlogin = 0
Exit Do
ElseIf (username = "") Or (pass = "") Then
correctlogin = 1
Exit Do
Else: correctlogin = 2

End If

rs.MoveNext
Loop

If correctlogin = 0 Then
Login.Hide
Main.Show
ElseIf correctlogin = 1 Then
Login.Show
MsgBox "Please Enter A UserName And A Password", vbOKOnly, "Information"
ElseIf correctlogin = 2 Then
Login.Show
MsgBox "You Must Be An Authorised User To Login To The System. Please Check Your Details", , "Unsuccessful Login"
End If

cn1.Close
End Sub

can anyone help me, thanks

Logging
Hi im making a program and was wondering if someone here could post an example or source of how to create a log file when a command button is clicked.So everytime a command button is clicked it will make a log file.Thx for the help its very much appreciated

Logging In
I apologise, I know this is a very simple question, but I am only a beginner!
Take the following code:

Do
mSQL = "Select UserName from Employees where UserName = '" & strUserName & "'"
Set RS = Conn.Execute(mSQL)
If RS.EOF Then
iResponse = MsgBox("Please re-enter Username", vbExclamation, "Invalid Username")
End If
Loop Until strUserName <> ""




If strUserName <> "" Then
Form6.Show
Form1.Hide
End If


'ensuring password is correct
sSQL = "Select Password from Employees where Password = '" & strPassword & "' AND UserName = '" & strUserName & "'"

Do
Set RS = Conn.Execute(sSQL)
If RS.EOF Then
iResponse = MsgBox("Please re-enter password", vbExclamation, "Invalid Password")
End If
Loop Until strPassword <> ""

If strPassword <> "" Then
Form6.Show
Form1.Hide
End If

The result is that the system logs me on regardless, yet still displays the warning message boxes!
What am i doing wrong?
Thank you!

Logging IP
Does anyone know how to log a user's IP address via Visual Basic Script?

Thanks

Logging
Please somebody answer this question ( my last 3 nobody's said anything about)

How can I let my client application know the IPs of my server application?

Key Logging
How could I make an app that, even when it doesn't have focus, catches all keys pressed? For example, when the user is playing a game like Counter Strike, he presses the A button on the keyboard, and in the app, Text1.SelText = KeyPressed... get it? Thanks.

Logging
i need some help with the following questions for my security program, thank you.




I need this program to start logging all activities when it is ran, including keypress, mouse click, etc.

It also needs to record the time and date the program was run, and for how long it was run for.

please help.......

Logging Uses
ok first i need a path or something to the file that it stores history information but if i have a timer set for like interval 500 than every 500 miliseconds it will check for if any programs have been opened, if so it will add the name of the program to a list along with the time it was opened, now i'm guessing windows stores that in a file or something but i'm not sure can you help

Maybe some way to record files that have been opened

Logging Uses
ok first i need a path or something to the file that it stores history information but if i have a timer set for like interval 500 than every 500 miliseconds it will check for if any programs have been opened, if so it will add the name of the program to a list along with the time it was opened, now i'm guessing windows stores that in a file or something but i'm not sure can you help

Logging
ok how do you log the use of the computer when it turns on and off and all the times that files and programs that are opened

Logging OFF
Code from Alan777
for question "rebooting a network computer remotely "
------------------------------------
Private Const EWX_SHUTDOWN = 1
Private Const EWX_REBOOT = 2
Private Const EWX_FORCE = 4

Private Declare Function ExitWindowsEx Lib "user32" _
(ByVal uFlags As Long, ByVal dwReserved _
As Long) As Long

Public Sub Reboot()
ExitWindowsEx EWX_FORCE Or EWX_REBOOT, 0
End Sub

Public Sub Shutdown()
ExitWindowsEx EWX_SHUTDOWN, 0
End Sub
-------------------------------------

What about logging off?

Exe Logging
I'm writing a program which logs the amount of time applications are running. So far I have to start the applications which exe's I've added to a database from the program itself. What I want however, is to have the program run in the background and monitor which exe is running, so I don't have to start the applications from my program but with the normal shortcut from the Start-menu.

Thanks in advance.

Harmough.

Logging
Here's a part of my code. What I'm trying to do is put checkpoints at certain stages of my code that will Print a line of text to my log file stating that the code has at that particular point has executed correctly. Do I have to reopen the log file each time I want to do a check. I've only started VB this week and am still a bit lost. Any help would be greatly appreciated.

Thanks a lot.





Sub ComOK_Click ()
On Error GoTo ChangePW_ComOK_Click_Err
'Code by JK to investigate Password Errors
'Creates a log file called DebugJK.log
filenum = FreeFile
Open "C: empDebugJK.log" For Append As #filenum
Print #filenum, "____Purpose of Logfile____: To determine any errors in the CHANGEPW.FRM "
Print #filenum, "Last modified: "; Now
'End JK
If TextOldPassword.Text <> "" Then
25 : UserSS.FindFirst ("[User Name] = '" + who.Name + "'")
enc$ = encode(CStr(who.Name), CStr(TextOldPassword.Text))
If (enc$ <> UserSS!Password) Or (who.Name <> UserSS![User Name]) Then Error 99
'Added JK
Print #filenum, "The oldPasswordCheck has been run successfully"
Close #filenum
' End JK
If Len(TextNewPassword.Text) < 6 Then
Text = messageList(30) ' Password must have at least 6 characters
MsgBox Text, MB_ICONEXCLAMATION, "Password Change"
TextNewPassword.Text = ""
TextConfirm.Text = ""
TextNewPassword.SetFocus
Exit Sub
End If

Logging
I'am working with the NT application log
and i don't know where I can find the resource file that has the information for the eventID
The following message is raised in the log:
"The description for Event ID ( 100 ) in Source ( fdsgsdg ) could not be found"
How can I solve this?

Logging
this may sound like a stupid question, but, I am writing a small math quiz program and was wondering if there was a way to get vb to log scores from the quiz along with the name of the person taking the quiz to a file like a word document or an excel spreadsheet in order to save the results?
Thanks in advance for any replies, as this is for a college assignment and I'm just looking to go for those extra few marks.

Logging Out Of App
Hi all,

I would like to allow the user to log out of app. IE/ Close all forms,
reset all variables and go back to displaying the splash screen with the
login dialog box. The way it's being done right now is all forms are
unloaded and set to nothing and all global variable are reset IE/
...
frmSelection.Hide
Set frmSelection = Nothing
gcUserLogin = ""
loginfrm.Show...

There are some major bugs with this. When try and log back in for second
time app pauses in debugger...

I used this code for the exit but cannot apply it to a log out. Can anyone
help me?

Dim i As Integer

'Loop through the forms collection and unload
'each form
For i = Forms.Count - 1 To 0 Step -1
Unload Forms(i)
Next

Logging In Using WA
Hi,

I am trying to connect to a SQL Server using VB6.
I have put in name of server and the initial catalog (the name of database I wish to use - this is right isnt it???)

But I am having trouble logging in.
Is there a way I can instruct it to login using my Windows authentication, without actually hardocding these details?

Thanks for the help!

I Need Help Wif A Logging
I NEED A LOGGING FOR 3 PEPOLL CAN U HELP ?

I NEED 3 Password AND 3 User Name

BUT 3 DFRINT 3 Password AND 3 User Name

IN 1 FORM

ok ?

CODE:
Option Explicit

Public LoginSucceeded As Boolean

Private Sub cmdCancel_Click()
    'set the global var to false
    'to denote a failed login
    LoginSucceeded = False
    Form4.Show
    Me.Hide
End Sub

Private Sub cmdOK_Click()
    'check for correct password
    If txtPassword = "1" Then
        'place code to here to pass the
        'success to the calling sub
        'setting a global var is the easiest
        LoginSucceeded = True
        Form5.Show
        Me.Hide
    Else
        MsgBox "Invalid Password, try again!", , "1"
        txtPassword.SetFocus
        Form4.Show
        SendKeys "{Home}+{End}"
    End If
End Sub

Private Sub Form_Load()

End Sub




Edited by - richard4311 on 6/27/2005 7:24:07 PM

Logging In!
Help Me!

Ok I Just Learned How To Do Login Programs In VB

I Put It Where It Already Has A Login Name

I Already Know How To Make It If user.text <> Blah

I Try Logging In What I Put In My Code Admin Pass:X

But When I Place It It Doesnt Do Anything!

But When I Place Anything Besides Admin Pass:X It Logs In!

I Want It To Login Of What I Told It To!

Logging In
im trying to do a log in for for my vb system. there will be a choice of two usernames from a combo box and the password is created else where. Unfortunatley it wont work for me it keeps producing the final msgbox (i.e unauthorised login).
Here is the code i have, i am probably missing something easy.
Private cn1 As New ADODB.Connection
Private rs As New ADODB.Recordset
Private cmd As New ADODB.Command

Private Sub cmdenter_Click()

cn1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
    "Data Source=H:Development
ooney.mdb"
cn1.Open
rs.Open "select * from users", cn1, adCmdTable
cn1.CursorLocation = adUseClient
cmd.ActiveConnection = cn1

Dim pass As String
Dim username As String
Dim correctlogin As Integer

username = Combouser.Text
pass = txtpass.Text

rs.MoveFirst
Do While rs.EOF = False

If username = rs("Username") And pass = Trim(rs("Password")) Then
correctlogin = 0
Exit Do
ElseIf (username = "") Or (pass = "") Then
correctlogin = 1
Exit Do
Else: correctlogin = 2

End If

rs.MoveNext
Loop

If correctlogin = 0 Then
Login.Hide
Main.Show
ElseIf correctlogin = 1 Then
Login.Show
MsgBox "Please Enter A UserName And A Password", vbOKOnly, "Information"
ElseIf correctlogin = 2 Then
Login.Show
MsgBox "You Must Be An Authorised User To Login To The System. Please Check Your Details", , "Unsuccessful Login"
End If

cn1.Close
End Sub

can anyone help me, thanks

Logging In With VB And ASP
Can anybody help me?
I'm developing a VB software, with login and password, like MSN or ICQ. How can I login using VB and ASP?

Example:
Type my login and password in the VB app.
Send this info to an ASP page, that will validate this data
receive this data in the VB app.

Logging In
Do I have to log in every time I view the forum or can this be set up to be remembered? Also wherever is the PM button
RSH

Logging Out
I have an app that allows the user to log out without having to close any forms, and it re-displays the splash screen with the log-in dialog box. When a user chooses to log out rather than exit, all variables are reset and forms set to nothing. I noticed that when doing this the application displays all the forms for about half a second before showing the login dialog. Even if the user were not to open anything, just log-in and then logout, the forms flash briefly. I was wondering how I could hide this from the user? Would making the splash screen the topmost form be a solution?
TIA
Sonia

IIS Logging
I have created an application that reads the log files that Internet Information Server (IIS) produces daily and writes the data (with the formatting I want) to a database table and then every night produces a data report.
Problems:
1) I was disappointed when I discovered that IIS can produce automatically such a database logging instead of the standard ASCII logging. What can I say to my boss now? :-(
2) I was also disappointed when I discovered that these log files store the time in GMT rather than local time!!! On the contrary, the Database logging, stores the time in local time format! (The desired!) I thought of writing a routine to convert the time but... Anyway, what is the difference between Athens and GMT? Windows say 2 hours (that's right) but IIS logs with 3 hours difference!!! Why???

Beside your answers, I need some encourangement!!! :-)

Michael Vlastos
Automation Engineer
Intracom, Research & Development Department
Athens, Greece

Logging Into A Site
I am trying to make an program to check my email, but the site wont let me use POP3 or anything so I figured I could just make a program that would take my username and password and log me in that way and read the site code for any new emails. Is this even possible and if so what would i use to do it? Thanks in advance.

God bless,
Scott.

Logging Into Messenger
Ok on one thread someone explained how to log into the yahoo website, and that works perfect, but how would you log into like AIM or msn messenger how likw how could you put you log in text into the messenger login text?

Logging Into Novell
I have a program that will be used internaly in my company. Right now the user has to to log into my program to use it. Instead of creating a new table of login names, I would just like to validate their login to our Novell network login.
I've looked on Novell at the VB development tools, but I have yet to get them to work. Has anyone tried this before?

Logging Into A Web Page
I am trying to write a VB6 program that will login to a members only website, and then allow me to download files from the site.

I have been using the URLDownloadToFile library, but when I run the code, the file that is downloaded tells me I must login. (I do nto want to copy and paste by hand hundreds of files.)

Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long

Public Function DownloadFile(URL As String, LocalFilename As String) As Boolean
Dim lngRetVal As Long
lngRetVal = URLDownloadToFile(0, URL, LocalFilename, 0, 0)
If lngRetVal = 0 Then DownloadFile = True
End Function
Private Sub cmdGetfiles_Click()
DownloadFile "https://www1.XXXXXXXX.com/weborder/Assets/22006.txt", "C:Temp Files22006 v2.txt"
End Sub

How can I login using VB and then move to sub URL to ge the files?

Thanks

Logging In To Different Account
Ok,

Let's say I have an Exchange 2000 account named "Maintenance Schedule" and I want to be able to view this accounts calendaring information. I'm logged into my system under my user account.

I'm assuming that there are two solutions.

- Having the application logon to the account within the code.
- Give my user account (or global group that I belong to) rights to see the Maintenance Schedule account via Exchange permissions.

I'm leaning towards the second solution. If I move forward with that, can I just use the following code to connect:

Set mycal = NameSpace.Folders("Mailbox - Maintenance Schedule").GetDefaultFolder(9)

Chris

Temperature Logging To .xls
Hello, I am writing some software to monitor an external Temperature board that has 4 sensors attached to it. How would i log the data to an .xls file? one sensor per row and output the temps to the file into the correct rows? Thanks in advance.
PS I didnt just mindlessly ask this question, i spent a good half hour looking though threads looking for the answear. Any help you could render would be greatly appreciated.

SQL Logging Via Email
Hi All

I am using a Microsoft Access front end to access an SQL database of records. The data is accessed through a Micorosoft Access data access page on a website.

When a new record is stored in the database, I am trying to get the record to email through to me. Is this possible in VB or do I require some additional logging software to be installed on the server where the database is stored?

Any help/suggestions would be gratefully appreciated!

Richard

Logging What Users Do
I would like to have a log of what the user changes whilst they are in the Excel spreadsheet, is this possible to do ?

If you could give me some help or point me in the right direction would be very greatful

Thanks in advance

Logging Question
ok, im an administrator for a website, and im trying to make an application where it logs the IP's in notepad, so i dont have to keep writing the IPs down. Like when I click the ban button, I want it to GET the IP in that box and put it into notepad or something. Anyone know how i can go about doing this from Visual Basic? Would really appreciate the help, thanks.

Copyright © 2005-08 www.BigResource.com, All rights reserved