|
So you have asked this question 8 times including in the Lounge - I'm bloody sure there were some excellent answers in there, go away and do some work.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
oh its really great to know that some one is hear just to count the questions and for any other --- Else.. I thought i can get some codes without doing any work at all..lol...according to your valuable stupid sugestion i will do my work lol....!If you dont know the answer better dont reply to people..and i am bloody sure that i asked the question only twice, one in C# forum and other in database forum... C# forum people suggested me to ask there lol... read the posts before comment (do your work first )...
|
|
|
|
|
Oops
My apologies - I did not read follow the links to the questions.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I'm searching for logic which will help me to retrieve table records based on "start index" parameter and parameter which specifies the returned records count. Example:
dbo.Records
num
1
2
3
4
5
SELECT num FROM dbo.Records will return 5 records. I cant find a function or something other which will help me retrieve the following logic
input params : @startIndex = 2 , @recordsCount = 2
so when i perform the select statement to retrieve the 2 records (3 and 4)
If there is no answer with an exact function, is there a wordaraund ?
Please help.
Regards Hris.
|
|
|
|
|
try this ...
select top @recordsCount num from dbo.records where num >= @startIndex
You may also be able to use something like this ...
select num <br />
from dbo.records <br />
where (num >= @startIndex) and (num <= @startIndex + @recordCount)
I haven't tested it, but it is probably close.
|
|
|
|
|
Hii
I am storing images in my sql server 2005 database. Is there any sql query or any other way to get the size of the image stored in my table?
Thanks in Advance
|
|
|
|
|
SELECT DATALENGTH(imagecolumn) FROM sometable
|
|
|
|
|
Hi ppl
Take a look a simple query.
String sql = (@"
SELECT Ins_ID, Ins_Nm
FROM Institution_Profile
WHERE Ins_ID = '{0}'
", combobox.Text);
If the query above works perfect without no erro then why the below query is not working.
String sql = (@"
SELECT Ins_ID, Ins_Nm
FROM '{0}'
WHERE Ins_ID = '{1}'
", tableName.text, Ins_ID.Text);
Anybody ans this pls
Thanks
|
|
|
|
|
It might be that you have made a typo.
Try changing tableName.text, Ins_ID.Text to tableName.Text, Ins_ID.Text .
But on the other hand it could be anything. If you ask a question about an error, tell people what the error is and which part of the posted code gives the error, otherwise most members will ignore you.
Also please don't use text speak in your posts. We older folks don't understand it and once again you are cutting down the number of people willing to help you.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Remove the single quotes from the tablename: FROM '{0}' becomes FROM {0}.
|
|
|
|
|
Fantastic....Worked
Thanks dude
|
|
|
|
|
This continues to be vulnerable to SQL Injection attacks.
|
|
|
|
|
To paraphrase dialog from the film 'Riddick': The CPer in me says that he has only just started learning SQL and nobody has given the little bit of help that he needs to continue with his project. However, the pedant in me says that I should tar and feather him for not following established best practice at all times; Ignorance of the Law is not a defence.
|
|
|
|
|
You should be using parameterised queries rather than injecting values into a SQL Statement. This is easy for data elements like the ID value, but slightly more difficult, yet doable, for the table name. As it stands your code is vulnerable to attack.
|
|
|
|
|
How to retrive attribute Name
<names>
<zipcode zc="*">
<rule rll="%LEIN">
Here the thing is in some Names tag the attribute of Rule is RL or RLL.
<rule rll="%LEIN">
<rule rl="LE%">
I am getting error at bold line below. Bcz, i mentioned direcly RLL. If RL exists as attirbute then getting error. how to get attribute name?
XmlNodeList NameList = doc.GetElementsByTagName("Names");
foreach (XmlNode node in NameList)
{
XmlElement nameElement = (XmlElement)node;
foreach (XmlNode xnode in nameElement)
{
XmlElement childElement = (XmlElement)xnode;
if (childElement.Name.ToLower() == "rule")
{
if (childElement.HasAttributes)
strrule = childElement.Attributes["RLL"].InnerText.ToLower();
}
}
}
G. Satish
|
|
|
|
|
Don't want to give stored proc to client? What are your options if there is one?
Thanks
dev
|
|
|
|
|
devvvy wrote: Don't want to give stored proc to client
Then don't
Have you considerd encrypting it?
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
I didn't know you can encrypt them? (stored proc in db owned by client)
dev
|
|
|
|
|
You can in SQLServer, don't know about the others, but why worry if its in their database? Have you hidden some sort of malicious timebomb code in the proc?
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
timebomb? no, just good code i plan to charge for money (as off-the-shelf-app)
I am evil yes i actually want to make money out of software sorry.
dev
|
|
|
|
|
Best option is to not give the password to the user. If the database is his/hers, then you should behave like a good guest within that database.
They're not going to put you out of business by copying your sprocs. People don't bother with that kind of thing, they just come here to ask for the code
I are troll
|
|
|
|
|
haha that's so true though
dev
|
|
|
|
|
In which case why not just put your business logic in the application - which generally they will be able to de-compile anyway
Its a constant battle to keep your code secure, but in my (25+ years) experience if you are selling to proper businesses they will respect your licence agreement.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
becuase it's more optimized in stored proc
dev
|
|
|
|
|
Seems you are stuck then.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|