954,568 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

HELP pls, making a Login form.

hello every1, really i need help on how i can make a login form that works and is connected to my database using ADO

my frmlogin is composed of 2 textbox (txtuser,txtpass)
and 2 command buttons (cmdlogin,cmdcancel)
and my database name is (MAINDB2)
inside MAINDB2 is (tblReg)
fields inside tblReg is (Username,Password)

and for example , field Username contains (tester)
, field Password contains (testpass)

and when i put (tester) in the txtuser
and (testpass) in the txtpass

it will connect
and do this

MAINMENU.show
unload me

-------------------------PLS HELP ME!!! =( --------------------------------

hawisme000
Junior Poster
102 posts since Jul 2007
Reputation Points: 10
Solved Threads: 2
 

Your question is already replied in the other thread.

debasisdas
Posting Genius
6,872 posts since Feb 2007
Reputation Points: 666
Solved Threads: 434
 

see the sample project.
hope u will grab some idea from it.

before running the code add some records to the database.

regards
Shouvik

Attachments Login_Apps.zip (10.66KB)
choudhuryshouvi
Posting Pro
553 posts since May 2007
Reputation Points: 30
Solved Threads: 49
 

sir choudhuryshouvi THANK YOU SOO MUCH!!!

really learn alot form the file u gave,

especially about the VISUAL-DATA MANAGER thing,

again t,y


umm, just wanna ask something if you wont mind,,

how can i connect to a access 2003 without using VDM??

just curious... and wants to learn more ,

sorry if im beginning to be a pain sir

hawisme000
Junior Poster
102 posts since Jul 2007
Reputation Points: 10
Solved Threads: 2
 

no question of pain. i feel always happy when i do reply to someone. ok, lets begin.

to connect the database without using the VDM you need to create an ODBC DSN for the type of database you wish to connected to.

to create the DSN follow the step:-

1.goto control panel
2.select administrative tools
3.select datasources(odbc)
4.in the user dsn tab click on add
5.select the appropriate database driver.
for access it is "Microsoft Access Driver(.mdb)"
for sql server it is "Sql Server"
for oracle it is "Oracle in orahome"
where version no. is the version of oracle u have installed in ur server machine.lets say if u have oracle9i installed then the driver becomes "oracle in orahome9i",etc.

6.after selecting the driver click finish.
7.then in the dsn dialog box enter the dsn name in the provided textbox.this name can be anything.but make sure that it doesn't conflict with other dsn names.
8.you can also specify a description fror ur dsn there.this is an optional field.
9.then click the select button and locate the database file you wish to connect through the new dsn being created.click ok to save all settings and create the dsn.


in case of operation with vb6 do the following steps:-

1.open a new project
2.goto project->reference
3.check on microsoft activex dataobjects library.again this version no. depends on the version of ur os and the version of ms-office u have installed.
4.click ok to add the reference to ur project.

*******now try this sample coding syntax***

'in form_load event......this is for connecting the database through the dsn
dim conn as new adodb.connection
dim rs as new adodb.recordset
dim str as string

on error goto err1

str="DSN=;UID=;PWD=;DBQ="

conn.connectionstring=str
conn.open
msgbox "The database has been connected and ready for use."

exit sub

err1:
err.clear
msgbox "Connection failed.Please check ur DSN configuration."
exit sub

after this you will be in the condition to begin any transaction with the access,sql server and oracle databases.

choudhuryshouvi
Posting Pro
553 posts since May 2007
Reputation Points: 30
Solved Threads: 49
 

sir Shouvik

thx again, now iv finished my login form, also ive tried connecting w.o VDM
and it works!!


many thanks sir

hail sir Shouvik!!!

=)

hawisme000
Junior Poster
102 posts since Jul 2007
Reputation Points: 10
Solved Threads: 2
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You