|
Thank you sir, I am using SQL Server 2000 as back end and login name are given to the users. My problem is when when a user doesnt login for 15 days then mail should go to all admin user.Also we have kept a config webform where he can give the connection string and other thing which application wants as global.
Please help me...
Thanks in advance...
|
|
|
|
|
the way i normally do passwords / logins is to create a single user in SQL server that will connect to the database. I store this username / password in the config file and create a table in my database which contains the username and some kind of password derivative. this table can also contain last login date, a flag for disabling the account etc.
as far as i know SQL server 2000 can run scheduled jobs, it also has a SQLMail function so you could get the sql server to send the emails direct.
Russell
|
|
|
|
|
Please help me with Windows Service as I want to do it with Windows Service only...
|
|
|
|
|
first you have to decide how the service is going to log in to the database. It will need to have a username and password to connect to the db. You've already stated that you don't want connection data in the config files so that leaves you with a hard coded username and password in the executable, which is less than perfect.
There's not much to creating a windows service (at least in theory) Create a windows service project and fill in the bits of code that need to be written. There are a few tricks to getting debugging to work while building services, google will help you here. If this is your first service project i would write the code in a console app and then move it into a webservices project when you are 100% happy with it.
Russell
|
|
|
|
|
Thanks yes this is my first Windows Services. Please help me with some code I mean give me idea how do i start writing with the code...
|
|
|
|
|
SELECT *
FROM Categories
WHERE (CategoryName LIKE '%_%')
hi all
When i run this code above. So will all reuslt
Why???
When i client write character _ on textbox search
How can i pervent this. And if character is _ so only view reuslt have character _
|
|
|
|
|
Here[^]
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
I am having a problem of getting the primary key or the id of the table I retrieve from the database in the Grid View so that I can delete it. So far I could get the index of the table such as which row I'd selected but it is not the primary key in my database.
Would need some help here, thanks.
J Liang
|
|
|
|
|
U can use the DataKeyNames of GridView to do this.When u write a query then take primary Key also with and store it in DataKyeNames.
Hope this helps u...
|
|
|
|
|
Hi,
I'm not sure how this DataKeyNames work but my code is like this.
For index As Integer = 0 To Me.gvStaff.Rows.Count - 1
Dim cb As CheckBox = CType(Me.gvStaff.Rows(index).FindControl("ckCheck"), CheckBox)
If cb.Checked Then
'I was trying to use the label to check whether it actually grab the value
Me.Label1.Text = Me.gvStaff.DataKeyNames.GetValue(0) 'Not sure it can work like this
End If
Next
J Liang
|
|
|
|
|
Do like this:
strval(0) = "ID"
strSql = "Your Query"
oDS = ObjDB.ExecuteDataSet(strSql) ' Execute your query which return dataset.
GridView1.DataSource = oDS
GridView1.DataKeyNames = strval
GridView1.DataBind()
On Row Command do this:
Dim oGridViewRow As GridViewRow
oGridViewRow = CType(CType(e.CommandSource, Control).NamingContainer, GridViewRow)
objLoanPayOff.LoanPayOffID = CInt(GridViewLoanPayOff.DataKeys(oGridViewRow.RowIndex).Value)
If e.CommandName = "DeleteTrans" Then
With objLoanPayOff
.ID = objLoanPayOff.LoanPayOffID
.UserId = CLng(Session("UserId"))
.FormId = msForm_TYPE.msForm_LOANPAYOFF
End With
objLoanPayOff.DeleteRecord()
errormsg.Text = const_MESSAGE_DELETE_RECORD
BindGridView()
ElseIf e.CommandName = "Edit" Then
Response.Redirect("frmLoanPayOffView.aspx?id=" & objLoanPayOff.LoanPayOffID & "&info=" & e.CommandName)
End If
Hope this help u...
|
|
|
|
|
Do like this:
strval(0) = "ID"
strSql = "Your Query"
oDS = ObjDB.ExecuteDataSet(strSql) ' Execute your query which return dataset.
GridView1.DataSource = oDS
GridView1.DataKeyNames = strval
GridView1.DataBind()
On Row Command do this:
Dim oGridViewRow As GridViewRow
oGridViewRow = CType(CType(e.CommandSource, Control).NamingContainer, GridViewRow)
objLoanPayOff.LoanPayOffID = CInt(GridViewLoanPayOff.DataKeys(oGridViewRow.RowIndex).Value)
If e.CommandName = "DeleteTrans" Then
With objLoanPayOff
.ID = objLoanPayOff.LoanPayOffID
.UserId = CLng(Session("UserId"))
.FormId = msForm_TYPE.msForm_LOANPAYOFF
End With
objLoanPayOff.DeleteRecord()
BindGridView()
ElseIf e.CommandName = "Edit" Then
Response.Redirect("frmLoanPayOffView.aspx?id=" & objLoanPayOff.LoanPayOffID & "&info=" & e.CommandName)
End If
Hope this help u...
|
|
|
|
|
Hi,
Thanks for the code, but what I did was I drag and drop the grid view from the Database Explorer, therefore I have none of those coding above that I can actually 'view' it physically.
The code I show you runs when I click on the delete button. Is there another way of getting the ID? As I tried to get part of your code into mine, I got this error
System.InvalidCastException: Unable to cast object of type 'ASP.staff_list_aspx' to type 'System.Web.UI.WebControls.GridViewRow'
from
oGridViewRow = CType(CType(Me.gvStaff, Control).NamingContainer, GridViewRow)
J Liang
|
|
|
|
|
Hi,
I have a login page where I type user name and passwordn text boxes and it matches the password with th database and three failed attempts it locks the user account and after that even the user try with his valid password it wouldn't allow the user to login in. My question is how can I lock the user account after three failed attempts.
|
|
|
|
|
erm.... your database is only good for storing data and providing views of it. Your code is free to do whatever it likes with this data, these are your business rules. So, you need a flag in the DB to tell you a members status, and if they are locked out, then you return a result to indicate this, and the UI shows them that this is their current state, so they can do something about it
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
How would I pass the values from a webpage to a modal popup. Right now I am doing like this. I am calling the modalpopup from the javascript function using window.openModalDialog() function. And in the popup webform I am setting the parameters to the hidden variables in the onload event of the body. once I load the parameters I am again calling the pageload manually by doing __doPostBack. The problem with this is the page is posting back twice(one initially and the other manually).
Following is the initialization method of the onload event.
function init()
{
var params = window.dialogArguments();
if(params != null)
{
document.getElementById('hiddenVar1').value = params[0];
document.getElementById('hiddenVar2').value = params[1];
...
__doPostBack('', '');
}
}
Since it is doing the postback twice it is hurting the performance. Please let me know if there is a better way to call the popups?
Thanks,
sridhar.
|
|
|
|
|
Doesn't that function take a URL ? Can't you pass params on the URL ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I can pass params on the url. But the problem is with security. The user can easily change the parameters and get different data. That is why I am not passing parameters as a query string.
Thanks,
sridhar.
|
|
|
|
|
your page should, no matter what, do a security check before showing any data.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi All,
I have one confusion regarding the webservices.
Suppose I made one webMethod in webservices .
Then how can I make this webMethod as secure one.
i.e If somebody come to know about the URL then can easily use this web Method.So how can I make sure that only the Authenticate person is using the webSevices Method.
IF anyBody has the idea please share it.
Thanks
Rahul
|
|
|
|
|
You can make your methods take a username/password. I'm not sure if you can check the calling IP address, and decide based on location. The Microsoft Web Service Extensions have other security features, also.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
In windows C# programing there is the ability to create C# windows projects like in SharpDevelop[^]. Is there anything like this that people could use on the internet? What I would like to do is allow people to access a SharpDevelop[^] kind of web page that users can create and change items on a web editor.
NOTE: I am not looking for an html web editor. I am looking for visual studio editor but web based.
Chris
|
|
|
|
|
Data driven development?
What kind of scalability?
|
|
|
|
|
I wouldn't say it is data driven....more like object driven. Were a user can drag and drop objects onto a designer and resize objects and configure an objects properties. Something like that.
|
|
|
|
|
maybe something like tibet from www.technicalpursuit.com.
or maybe one of those OS sites like gh.os.t or bobel or something like that.
|
|
|
|