15,908,015 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 Justin Jendrick Nocillado (Top 6 by date)
Justin Jendrick Nocillado
11-Jul-13 22:19pm
View
It does work when i try select 1 table only..
Dim MyCommand As New SqlCommand()
Dim myDA As New SqlDataAdapter()
Dim myDS As New AGprint() 'The DataSet you created.
Try
MyCommand.Connection = cn
MyCommand.CommandText = "SELECT * FROM actualguesting where foilionum=" + mainForm.folioid
MyCommand.CommandType = CommandType.Text
myDA.SelectCommand = MyCommand
myDA.Fill(myDS, "actualguesting")
myDS.EnforceConstraints = False
Dim rpt As New AGprintreceiptDC() 'The report you created.
rpt.SetDataSource(myDS)
CrystalReportViewer1.ReportSource = rpt
Justin Jendrick Nocillado
30-May-13 4:25am
View
winforms - VB .net - VS2010
Justin Jendrick Nocillado
15-May-13 2:48am
View
If srchtbl.Item(1, j).Value = ComboBox1.Text Then <- here
Justin Jendrick Nocillado
30-Apr-13 10:53am
View
Get it. Thanks for helping :)
Justin Jendrick Nocillado
29-Apr-13 11:04am
View
I'll try that later.Thanks
----
Problem Solved! Thanks Matej and Keith.
BTW, is this correct? to avoid sql injections?
sqlCommand.CommandText = "Select " + userTemplateColumn + " from " + userTable + " where username='" + registration.txtusername.Text + "'"
Justin Jendrick Nocillado
29-Apr-13 6:43am
View
in this Line:
<pre lang="vb">bytes = usr</pre>
This is the fullcode
<pre lang="vb">
Private WithEvents verifyControl As DPFP.Gui.Verification.VerificationControl
Private matcher As DPFP.Verification.Verification
Private matchResult As DPFP.Verification.Verification.Result
Private allReaderSerial As String = "00000000-0000-0000-0000-000000000000"
Public template As DPFP.Template
Private userTemplateColumn As String = "Template"
Private userIDColumn As String = "ID"
Dim bytes As Byte()
Private Sub CreateDPControl(ByRef control As DPFP.Gui.Verification.VerificationControl)
Try
control = New DPFP.Gui.Verification.VerificationControl()
control.AutoSizeMode = Windows.Forms.AutoSizeMode.GrowAndShrink
control.Name = "verifyControl"
control.Location = New System.Drawing.Point(0, 0)
control.ReaderSerialNumber = "00000000-0000-0000-0000-000000000000"
control.Visible = True
control.Enabled = True
control.BringToFront()
Me.Controls.Add(control)
Catch ex As Exception
MessageBox.Show("exception")
End Try
End Sub
Private Function ConnectString() As String
Dim connectionString As String
connectionString = "*****************************"
Return connectionString
End Function
Private Sub VerifyBiometric_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
matcher = New Verification.Verification()
matchResult = New Verification.Verification.Result
CreateDPControl(verifyControl)
End Sub
Private Sub verifyControl_OnComplete(ByVal Control As Object, ByVal FeatureSet As DPFP.FeatureSet, ByRef EventHandlerStatus As DPFP.Gui.EventHandlerStatus) Handles verifyControl.OnComplete
Dim dataSet As DataSet = New DataSet()
Dim adapter As SqlDataAdapter = New SqlDataAdapter()
Dim sqlCommand As SqlCommand = New SqlCommand()
Dim ctr = 0
Try
Dim max As Integer = 0
Dim cn As New SqlConnection(ConnectString())
cn.Open()
sqlCommand.CommandText = "Select template from usertbl where username='" + registration.txtusername.Text + "'"
sqlCommand.CommandType = CommandType.Text
sqlCommand.Connection = cn
Dim lrd As SqlDataReader = sqlCommand.ExecuteReader()
Dim usr
While lrd.Read()
usr = lrd("template")
End While
bytes = Nothing
bytes = usr
template = New DPFP.Template()
template.DeSerialize(usr)
'Perform match
matcher.Verify(FeatureSet, template, matchResult)
If matchResult.Verified Then
EventHandlerStatus = Gui.EventHandlerStatus.Success
MsgBox("Verified!")
Me.Hide()
registration.Show()
Else
EventHandlerStatus = Gui.EventHandlerStatus.Failure
MsgBox("Please Try Again!")
End If
Finally
End Try
End Sub</pre>
Show More