|
Depends - are you using UDP or TCP?
|
|
|
|
|
First creative android performs extremely relaxing dance playfully. (5)
|
|
|
|
|
First Creative Android Performs Extremely Relaxing
dance playfully
CAPER
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Yup.
|
|
|
|
|
Caper?
cheers,
Super
------------------------------------------
Too much of good is bad,mix some evil in it
|
|
|
|
|
|
Please help why "Syntax error in FROM clause"
here my code in visual basic 2008...
Imports System.Data
Imports System.Data.OleDb
Imports System.Data.DataTable
Public Class Form3
Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim conn As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\Database4.accdb")
Dim cmd As New OleDbCommand("select* from Table where [name]=@user and [address]=@pass", conn)
cmd.Parameters.Add("@user", OleDbType.VarChar).Value = TextBox1.Text
cmd.Parameters.Add("@pass", OleDbType.VarChar).Value = TextBox1.Text
Dim adapter1 As New OleDbDataAdapter(cmd)
Dim table As New DataTable
adapter1.Fill(table)
If table.Rows.Count <= 0 Then
MsgBox("Error username or password")
Else
MsgBox("Login Successfully")
End If
End Sub
End Class
|
|
|
|
|
Wrong place to ask - it even says so at the top of the page in red letters!
Try here: Ask a Question[^] and please try to pay attention to where you are posting if you want people to help you for free rather than annoy them ...
And don't call your tables by SQL Reserved words: "Table" is either not the name of where you store that info, or you should change it. Not only is "Table" a reserved word, it tells nobody anythign about what kind of data it contains, and that's kinda important ...
Fix that, and your problem will go away.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Also, never use select * in production code. Someone might add a new column to the table and your code might have a future bug.
Also also, select* should have a space between select and *.
|
|
|
|
|
people still use this?
Caveat Emptor.
"Progress doesn't come from early risers – progress is made by lazy men looking for easier ways to do things." Lazarus Long
|
|
|
|
|
VB or Access?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Yep, VB was complete and utter filth back in its day. That people still use it is somewhat astonishing.
Whenever you find yourself on the side of the majority, it is time to pause and reflect. - Mark Twain
|
|
|
|
|
I'm currently doing a VB project
I don't have a lot of problems with VB, although I find C# a lot more elegant.
In theory VB and C# had pretty much the same capabilities and you could write clean code in both.
In practice, VB programmers are far more often a bunch of amateurish bunglers who couldn't write clean code if their life depended on it
That doesn't mean those people don't write C# code either!
|
|
|
|
|
There is a problem in almost every line of that code.
|
|
|
|
|
You're being a little harsh, there!
I thought it was rather innovative in the way that it uses the same TextBox for both user name and password.
Whenever you find yourself on the side of the majority, it is time to pause and reflect. - Mark Twain
|
|
|
|
|
Well ... makes it easier to remember!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
It also makes it easier to debug. The problem is definitely associated with that text box.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
|
You call it password, I call it address, let's call the whole thing off!
|
|
|
|
|
Not to mention storing the password in plain text.
But on the plus side, it doesn't have a SQL Injection vulnerability. Which is quite rare for this sort of question.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Richard Deeming wrote: But on the plus side, it doesn't have a SQL Injection vulnerability. Which is quite rare for this sort of question.
Good point.
All those who say "there's nothing new under the sun", take note!
Whenever you find yourself on the side of the majority, it is time to pause and reflect. - Mark Twain
|
|
|
|
|
admin, admin?
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
|
This is a rare example of a question which isn't vulnerable to SQL Injection. Bobby Tables doesn't apply here.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
You are of course entirely right. I'd read the code and my brain screamed "this is so wrong" so loudly that I overlooked the parameters...
|
|
|
|