If i put the code (you given me) inside my ASP.NET QueryString then I can execute this command. But I want this code inside my SQL SERVER 2005, So when someone Logon then it will cecck the the Status from MemberStatus.
Please tell me what should I do? Thanks again for your Help.
I think you don't need to enclose agentid in ' so your query should look like this:
SELECT * FROM agent WHERE agentid = textBox1.Text
Also, your query is prone to sql injection attacks. For more information about it and preventing them have a look at this article: SQL Injection Attacks and Some Tips on How to Prevent Them[^]
thank you all for your time .
currently im working on a project which involve oracle database there for my application insist of oracle client 8.7 or higher to be installed on the end user machine in order to work.
i need an advice for a light oracle client , untill now i was testing the application with oracle client 9i ,it works great , but the problem is that this client is about 600mb while compressed and arround 1gb after installation , my customers are concerned about it , since its a small application , why does it need such a huge oracle client in order to work?
so my question is , if you know of some "smaller" oracle client that applications like that can run with?
I'm modifying a program (oQuery) that I found on this site so that it will allow updates too.
My problem is how do I do an update using some generic query execution. My problem comes up when I try and get the number of rows returned. So how can I tell that the user just did an update and then find out how many rows were affect by that update?
mssqlComm.CommandType = CommandType.Text<br />
mssqlComm.CommandText = sqlQuery 'this is the query from the user<br />
mssqlComm.Connection = mssqlConn<br />
mssqladpt = New SqlDataAdapter(mssqlcomm)<br />
mssqlds = New DataSet<br />
The first enables you to set multiple variables in a single statement, and has no problems with multiple rows being returned - the variables are set to the values in the last row returned. SET will raise an error if more than one row is returned.
DoEvents: Generating unexpected recursion since 1991
I have 2 databases and one table for each of database. The tables have the same structure. One of them is populate and I want to copy the contain of this to the second table. I want to ask if this is possible with DTS.
You can do this with DTS - however I would advise just writing a stored procedure or an adhoc script to do a select from one table to insert into the other.
The reason I mention this is that DTS packages with all their VBScripting etc can hide a lot of their functionality.
From a maintenance point of view this can sometimes make it very difficult to see what is going on.
One more issue is this - SQL Server 2000 DTS packages don't like temporary tables in their data pumps(I don't know about 2005), you can use them but you have to be wily in how you use them.