15,911,707 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Beiniam (Top 5 by date)
Beiniam
12-May-14 11:25am
View
no I have no idea to write, pls help me
Beiniam
24-Dec-13 6:07am
View
yes, how can i solve this?
Beiniam
24-Dec-13 3:09am
View
@ Er. Tushar Srivastava i check using xammp 1.6.4 with PHP version 5.2.4 and when i check it says me "Your host needs to use PHP 5.3.1 or higher to run this version of Joomla!"
Beiniam
21-Aug-13 2:54am
View
my question is
1) how can i update the database through datagridview based on my datasate?
Beiniam
12-Jun-13 3:30am
View
here is my code
Dim logcn As New OleDbConnection("Provider=Microsoft.Jet.Oledb.4.0; Data Source=" & Application.StartupPath & "\Login.mdb")
Dim logda As New OleDbDataAdapter()
Dim logdt As New DataTable()
' Dim co As New OleDbConnection("Provider=Microsoft.Jet.Oledb.4.0; Data Source=" & Application.StartupPath & "\Login.mdb")
Private ConnnectionString As String = "Provider=Microsoft.Jet.Oledb.4.0; Data Source=" & Application.StartupPath & "\Login.mdb"
Private dn As New DataSet()
Dim mypath = Application.StartupPath & "\Login.mdb"
Dim Password = ""
Dim conn As New OleDbConnection("Provider=Microsoft.Jet.Oledb.4.0; Data Source=" & Application.StartupPath & "\Login.mdb")
Dim cmd As OleDbCommand
Dim cn As New OleDb.OleDbConnection("Provider=Microsoft.Jet.Oledb.4.0; Data Source=" & Application.StartupPath & "\login.mdb")
Dim sql As String
' Dim CMD As OleDb.OleDbCommand
Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click
Dim sql = "SELECT Username,Password,LoginAs FROM UserLogin WHERE Username = '" & UsernameTextBox.Text & "' AND Password = '" & PasswordTextBox.Text & "' AND LoginAs ='" & LoginAsCombobox.Text & "'"
Dim log = "SELECT LoginAs FROM UserLogin"
Dim loginas = "SELECT LogionAs FROM UserLogin"
conn.Open()
cmd = New OleDbCommand(sql, conn)
Dim dr As OleDbDataReader = cmd.ExecuteReader
' Dim connString As String = "Provider=Microsoft.Jet.Oledb.4.0; Data Source=" & Application.StartupPath & "\login.mdb"
' conn.Close()
Try
If dr.Read = False Then
conn.Close()
MessageBox.Show("Authentication Failed...")
Else
conn.Close()
'With ERA_DMS_HOME
' .LoginAsToolStripMenuItem.Text = GetUserName()
' Dim logform As New LoginForm1
Dim homform As New ERA_DMS_HOME
homform.Show()
Me.Hide()
'logform.Hide()
' End With
End If
Catch ex As Exception
conn.Close()
MsgBox(ex.Message)
End Try
If conn.State <> ConnectionState.Closed Then
conn.Close()
End If
End Sub