Showing posts with label button. Show all posts
Showing posts with label button. Show all posts

Friday, March 23, 2012

help on inserting data to DB

Hi,

I m using Microsoft Visual Studio 2005 and SQL server 2000. I have 2 textboxes and a button, what i wanna do is, when i hit the button, the values in textboxes should be inserted into DB. Would you please help me?

Thanks in advance.

There is a tutorials section on this website (www.asp.net). You will get a comprehensive help (code + concept). Once you understand the concepts and make an effort and if you still have issues please post with code and someone here will definetely help you out.

Monday, March 12, 2012

help needed to validate 2 users at once

hi all, i want to ask about validating 2 users (2 userids and 2 pws) with one button. my database table called login and it has loginId and password.

have tried

"SELECT * FROM login Where loginId = '" + hoName + "', '" + toName + "' AND password = '" + hoPassword + "', '" + toPassword + "'"

please help me!!

i'm using 03 to build, theres no errors. but when i view in browser and try to validate. a wole lot of errors come out.

|||

hi all, can anyone help me please?

|||

I didnt get u r question. Can u explain in detail. You want to check the two users and their passwords at a time or what. Clarity is required.If u give the reply i can try out and i will try to give the solution

Thank u

Baba

|||

SELECT COUNT(*)

FROM Users

WHERE (UserID=@.UserID1 ANDPWD=@.PWD1) OR (UserID=@.UserID2 ANDPWD=@.PWD2)

|||

thanks all.

Friday, March 9, 2012

help needed ! sql query

my app contains one form (aspx) and it has different controls to be filled by user (textbox,radiobutton ..etc)
it has one button which i want to use to pass values entered in these controls to other page and do some queries to sql server there (2nd page)
Now the thing is ...my controls can have NULL values ...like user could enter just one parameter and hit button
or user can fill 2 parameter and hit enter
so on the other hand (2nd page) how should i query the database accordingly ...

Example:
if (myTextBox.Text == String.Empty)
{
myParameter.Value = DBNull.Value;
}
else
{
myParameter.Value = myTextBox.Text;
}
|||

You can always use an If Else loop to write the query.
If IsDbNull(parameter) Then
parameter = (Whatever default value or just null)
Else
parameter = Request.Form("name of parameter")
End If
I hope this is clear enough.

Friday, February 24, 2012

Help me print report button is not working

Hi
I am using Crystal Reports 8.5 version in VB 6.0. I am viewing reports
using CRviewer . When i click on Print report button in CR viewer controlnothing is happining. I am unable to print the report. please help meout. although with same printer settings other files(.Txt,.xls) get printed.
Thanx
RitikIs it possible for you to post the code over here ?

Sunday, February 19, 2012

Help me please i have a problem in ALTER command

Dear all

I need to add new column in table TranPay , I use ALTER command on PDA on Button Click

Dim SqlStm = "ALTER TABLE TranPay ALTER COLUMN TranKey IDENTITY (1, 1)"

Dim Dcmd As SqlCeCommand = New SqlCeCommand

Dcmd.Connection = Conn

Dcmd.CommandText = SqlStm

Dcmd.ExecuteNonQuery()

But cannot create new Field , Help me please

Brg ,

Tingnong

Try this:

ALTER TABLE TranPay ALTER COLUMN TranKey int IDENTITY(1,1)

You must specify the column data type.|||

Try this:

Code Snippet

ALTER TABLE TranPay ADD TranKey int IDENTITY (1,1)