|
I think I've seen the problem.
Your query is SELECT MemberId ...
You are then attempting to read memberUsername and memberPassword from the query. These don't exist.
Upcoming FREE developer events:
* Developer! Developer! Developer! 6
* Developer Day Scotland
My website
|
|
|
|
|
so the query would be SELECT memberUsername and memberPassword and delete the WHERE query?
Life is up and down
Nevertheless,never give up hope and be confident to yourself
|
|
|
|
|
kc_renji wrote: so the query would be SELECT memberUsername and memberPassword and delete the WHERE query?
WHERE is not a query, it is a clause of the SELECT query.
Your query should be what works. Your current query and code do not match. They need to match. From what I've seen of your code neither are robust enough to form a good solution.
Upcoming FREE developer events:
* Developer! Developer! Developer! 6
* Developer Day Scotland
My website
|
|
|
|
|
Erm i am not really understand that
Since the user enter their name and password
Should the query would verify if the name and password entered would match their memberID???
If not..what should i do?
Life is up and down
Nevertheless,never give up hope and be confident to yourself
|
|
|
|
|
kc_renji wrote: Should the query would verify if the name and password entered would match their memberID???
If not..what should i do?
I've already given you lots of advice.
Your query should not be returning passwords. It should probably just be returning the MemberID. If no rows are returned then obviously the login has failed.
You should store the memberID in the session as that will be connected to other parts of the system. (Assuming the database is well designed)
You should follow the other advice I've given, especially about SQL Injection Attacks. Your code is very weak and quite vulnerable to attack.
Upcoming FREE developer events:
* Developer! Developer! Developer! 6
* Developer Day Scotland
My website
|
|
|
|
|
Thanks a lot..I have solved my problems
^_^
Life is up and down
Nevertheless,never give up hope and be confident to yourself
|
|
|
|
|
I am not very expert and i am trying to make simple billinvoice soft.
my question is when we enter ,how cursor will go to the next column,and also how new billno generate when perivious save.
|
|
|
|
|
vb.net8 wrote: I am not very expert and i am trying to make simple billinvoice soft.
my question is when we enter ,how cursor will go to the next column,and also how new billno generate when perivious save.
If you are dealing with regular textboxes, all you have to do is to either set the "Tab Order" for the fields, or force focus to the field you want using:
<br />
[Field Name].Focus()<br />
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
Hi...
Firstly i want to know which is the control u are using to enter the data...
Can u be plz more specific about what exactly u understand by saving invoice..
|
|
|
|
|
Hii ,
I am creating a datagridview at runtime .And i am assinging the rowheaders and column headers using Input Box .Now,I enter some values in cells .
It is showing the values Consistently .
Now my task is to save the Datagridview into xml and retrieve the same datagridview cell values and header values .
Please help me in writing the grid cell values ???
DVS
|
|
|
|
|
when i try to run the appication and login, there is an error SqlException was unhandle by the user code, Must declare the scalar variable "txtUserId"..What is that mean??Im still a beginner..
Please help.here is the code:
Protected Sub btnLogin_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnLogin.Click
Dim conMbr As New SqlConnection
Dim cmdMbr As New SqlCommand
Dim sqlReader As SqlDataReader
Dim strVerifyMbr As String
conMbr = New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename='C:\Program
Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\GpsCinema.mdf';Initial
Catalog=GpsCinema;Persist Security Info=True;User
ID=sa;Password=password;MultipleActiveResultSets=True;Connect Timeout=30;User
Instance=False;Context Connection=False")
conMbr.Open()
strVerifyMbr = "SELECT MemberId FROM datMember WHERE memberUserName=@txtUserId.text AND
memberPassword=@txtPwd.Text"
cmdMbr = New SqlCommand(strVerifyMbr, conMbr)
Dim checkUsr As String = ""
(CODE ERROR)here ->sqlReader = cmdMbr.ExecuteReader
While sqlReader.Read
If txtUserId.Text = Convert.ToString(sqlReader("memberUsername")) Then
If txtPwd.Text = Convert.ToString(sqlReader("memberPassword")) Then
Session("username") = sqlReader("memberUsername")
Session("password") = sqlReader("memberPassword")
Server.Transfer("MainUser.aspx")
Else
Response.Write("window.alert('Invalid Password.
Please try again.');<" + "/script>")
Server.Transfer("MainUser.aspx")
End If
End If
checkUsr = "Failed"
End While
If checkUsr = "Failed" Then
Response.Write("<SCRIPT lanquage='JScript'>window.alert('Invalid Username! Please Try Again.');<" + "/SCRIPT>")
Server.Transfer("MainUser.aspx")
End If
conMbr.Close()
End Sub
<div class="ForumSig">Life is up and down
Nevertheless,never give up hope and be confident to yourself</div>
|
|
|
|
|
kc_renji wrote: strVerifyMbr = "SELECT MemberId FROM datMember WHERE memberUserName=@txtUserId.text AND
memberPassword=@txtPwd.Text"
You should change this to:
strVerifyMbr = "SELECT MemberId FROM datMember WHERE memberUserName='" + txtUserId.text + "' AND memberPassword=' + txtPwd.Text + "'"
However you are susceptible to SQL injection attacks if you try this approach. You should consider using stored procedures for database operations and pass parameters to them.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Thanks.You have solved my problems.. ^_^
Life is up and down
Nevertheless,never give up hope and be confident to yourself
|
|
|
|
|
Hi,
As we have AutoGeneratedColumns property in GridView of ASP.Net Framework can we have the same functionality in vb.net ???
Thanks
|
|
|
|
|
VB.NET has nothing to do with it.
Yes, auto-generated columns exist with the DataGridView in Windows Forms. In fact, if you don't supply columns yourself, autogen'd columns are made by default.
|
|
|
|
|
hi all
i have to autogenerate invoice no which should be alphnumeric.
Had any one idea about how to autogenerate IDs
poonam
|
|
|
|
|
Where is this invoice number being generated from and what are the constraints?
I presume it will be generated in the database, in which case you can use an identity column. If that is not an acceptable solution then you need to give more information.
Upcoming FREE developer events:
* Developer! Developer! Developer! 6
* Developer Day Scotland
My website
|
|
|
|
|
If this does not work why not just use a varible as a counter if you creat it as a user varible it will hold even when the program shuts down. that way if you need to you can reset it programicaly the only problem i could see with this is if you jumped the app to a different system but using the same db
|
|
|
|
|
deathbat wrote: If this does not work why not just use a varible as a counter if you creat it as a user varible it will hold even when the program shuts down
What exactly is a "user variable" and how is it different to any other kind of variable?
How does it hold on to the value when the program shuts down?
Upcoming FREE developer events:
* Developer! Developer! Developer! 6
* Developer Day Scotland
My website
|
|
|
|
|
Hi,
I am new in .net. I am making an application using datagrid which is showing details about employees. So I want to make my data grid searchable. So i am using a textbox where user can enter some data into it and the matching result with all the columns will be displayed in the datagrid. If anyone knows how to do it or anyone hav a code for it. Please reply me
Rock Star
|
|
|
|
|
Hi Rock Star
Check my Article, it will show what to do, and dont forget to vote.
http://www.codeproject.com/useritems/N-Tier_Application_VB.asp[^]
Cool
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Hi friends,
I m working in vb6.0
Please help me.
I have set multiple profile in out look. I want open single selected prfile from software.
for that i want clue how to set pst path through vb.
Thank You
-- modified at 1:53 Tuesday 20th November, 2007
|
|
|
|
|
Hi all,
help so that i create myproject setup loaded with all required Mssql database files in which i have created my database say mydatabase.
kindly help me
Thanks ....
rmshah
Sr. Developer
|
|
|
|
|
Hi
I have Create windows Services. I have set Prorerty ServiceProcessInstaller Account is " LOCAL SYSTEM "
I want to get current loggin User ID..
If I set ServiceProcessInstaller Account is "USER" I can read User id But If i set " LOCAL SYSTEM " I cant read. But My Recruitment is Local System at the same time I want to read Current Login User Id.
How I can Read Help Me... sigh:
Thanks & Regards,
Sathiskumar.M
|
|
|
|
|
Does anyone out there have a VB.NET code sample that allows me to modify WMA tags (WMAID3Tag, e.g., Title, Artist, Genre, etc.) and save them back into the WMA file? I've found plenty of samples of code that reads these tags, but none that write changes back to the file.
Thanks,
Alan
alanbrobst@comcast.net
|
|
|
|