java


Login Form Netbeans


Is there any other option? because my teacher doesn't want that
I have imported entities classes from database
Can I login without connector just with "Select"
conn = DriverManager.getConnection("jdbc:sqlserver://localhost:1433;databaseName=CMSfinal", "sa", "sa");
pst = conn.prepareStatement("SELECT * FROM Administratori WHERE username_adm = ? AND password = ?");
pst.setString(1,txtUsername.getText());
pst.setString(2,txtPassword.getText());
rs = pst.executeQuery();
if (rs.next()){
PunetoriForm pnt = new PunetoriForm();
pnt.setVisible(true);
pnt.emAdmin.setVisible(false);
super.dispose();
} else {
JOptionPane.showMessageDialog(null, "Gabim ne Username ose Password", "Access Denied", JOptionPane.ERROR_MESSAGE);
}
} catch(Exception e){
JOptionPane.showMessageDialog(null, e);
}

Related Links

struts2 How read value iterator from jsp to action
Is the following code thread safe?
get the pattern before a given word
Find Prime Numbers based on user input [closed]
Why constructor call is not ambiguous in the following example? [duplicate]
Struts 2 jQuery grid load data from JSON string
Google glass and sockets
Why is there a class with entity name plus an underscore for JPA entity class
Getting a white screen when playing
For what are used the first 2 bytes in a java String
Exporting java apllication including database
How to send a mock object as JSON in mockmvc
How to design not in/exclude query behaviour
Jboss as maven plugin remote deployment issue
Can I create a singleton class that can have one Apache common net FTPClient connection and use it in multiple function calls? [duplicate]
Do javamail need email server running to send and recieve mails?

Categories

HOME
hive
deployment
amazon-ec2
mediawiki
tinymce
dot
mean-stack
spagobi
yahoo-oauth
cmd
paw-app
jsrender
jgroups
ebean
fingerprint
azure-storage-tables
autotools
session-variables
here-api
floating-action-button
size
leiningen
designer
workload-scheduler
progressive-web-apps
highlight.js
google-static-maps
ehcache
excel-2007
autosys
react-css-modules
elasticsearch-net
libssl
subdomains
quote
lightswitch-2013
socialengine
bcd
binary-data
.net-4.0
uiswipegesturerecognizer
wallpaper
normal-distribution
wpf-controls
main
space-complexity
splice
jvm-languages
mime
datastax-startup
tizen-native-app
gabor-filter
nstextview
worker-thread
nbconvert
spring-cache
angular-strap
android-fonts
pagedlist
essence
bluemix-app-scan
hsv
spim
android-listview
tableau-online
appfabric-cache
sorl-thumbnail
pick
phalanger
preferences
zend-route
has-many-through
dml
wp-query
typo3-neos
monomac
mqx
interface-orientation
sabredav
limejs
html-editor
smtp-auth
specification-pattern
unc
isnullorempty
google-email-migration
broken-links
bubble-chart
dotnethighcharts
spring-portlet-mvc
xtype
actionview
imac
xfbml
radcombobox
paster
coda-slider
bespin
web-architecture
thread-local-storage
ubuntu-9.04
dbisam
windows-live-messenger

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile