I've fixed the problem. Instead of passing the values as DateTime, I converted them to varchar in the sql statement in the yyyymmddd format and sorted it by that. Then in the datagrid, I simply used the dataformatstring method to display the date correctly.
I'm attempting to use the Sort method on a DateTime field within a DataView and it is sorting as a text field instead of a DateTime field when it's displayed in the datagrid.
When sorting the field in SQL Server2K it sorts correctly so I must be losing the DateTime declaration when I fill the...
I'm trying to open an MS Word document that is stored in a sql server db. I can open it successfully within IE using:
Response.ContentType = selectFile.FileType.ToString();
Response.BinaryWrite((byte[])selectFile.FileContents);
but I want it to open the file using Word.
The...
As I said in my original post, I'm using ASP.Net which uses a textbox with its multiple row setting to true. Therefore the wrap="hard" doesn't work. However, your idea would work if there is a way to force a "\n" where the text wraps on an ASP.Net textbox.
Is there a way to expand a multiline textbox to show all data when printing? Right now if there is any data entered in beyond the visible amount of rows, that data won't appear when printing.
Thanks.
Thanks for the response. That does work well to get the number of line breaks however, I'd have to depend on the user using the line breaks instead of the auto-wrap. If the user just continued to type, then the rowcount would be thrown off due to the lack of "\n".
Thanks again.
I want to give users a fixed # of rows to enter their information in a multiline textbox so I'm trying to determine if there's a way to prevent them from entering information beyond the 10 rows that I have showing by default. I realize I can limit the # of characters they can enter by using...
Is there a way to retrieve the current row number that a user is entering information on using javascript? My goal is to restrict user input once they've reached x number of rows in the textbox. Perhaps there's a better way to do this.....?
Anyway,
I'm using an asp.net webform with the...
That worked great.
Let's try taking it one step further:
select ID, city, score, date from t as q
where score in (select max(score) from t
where t.city = q.city)
The above queries output:
ID City Score Date
1 Ada 100 1/1/2003
6 Ada 100 12/12/2003
4...
ID City Score
1 Ada 100
2 Ada 95
3 Globe 91
4 Globe 96
Using the sample above, I'm trying to only retrieve the records for each city with the top score. In this case that's obviously ID#'s 1 & 4...
This works,
Select checksource.c_Remitname, CheckNames.cn_name
From checksource, checknames
Where checksource.c_Remitname Like (Left(CheckNames.cn_name,3) + '%')
All I did was modify " to '.
Thanks for the help.
Ok, your code works (thank you), BUT only in MS ACCESS. If you try putting that code into the same scenario for SQL SERVER, it doesn't.
Interesting.
Thanks for the help.
//I get the following error
Invalid column name '*'.
//when I run the code below with query analyzer:
Select checksource.*, checknames.*
From checksource, checknames
Where checksource.c_Remitname Like (Left(CheckNames.cn_name,3) & "*")
I want to compare names in two tables but haven't found the best way to accomplish this. I know it's not a perfect science but I thought the LIKE operator would be a good start.
C_Name C2_Name
Darin Samuel
Sam Darren
Frank Bill
I'd like to compare...
I'm sure this question has been asked a thousand times but can subforms be inserted into data access pages? When I save a forms straight from Access to the Data Access Page format the subforms are dropped. Are there other problems that occur when creating Data Access Pages?
Thanks
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.