I have a sql database where i have descriptions of products stored. I insert text using a simple sql insert and that seems to work fine. But when i try to get these texts and display them in a gridview with an object data source thet brake rows are not displayed. The text is just display with now row brakes at all.
How can i fix this so that i get it displayed in rows? Because its almost unreadable like ths.
I know this question has been asked here before, but it was ridiculously answered : http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=98764&SiteID=1
I have a text object on my crystal report, to which I programmatically want to assign text in CS. It all works fine, except that if I have html tags in there, the text doesn't get formatted, it just displays the html tags as text as well.
Now in thread linked above, the answer was: right click the text object, and format the text object, hit paragraph text and select text interpretation to HTML. The only problem is, that for a text object, it doesn't have the text interpretation option. It's only an option for a formula field. It says so in the tech support link posted inside the post itself!!!
So if you have any idea how I can do this, please someone help me out. I am new to crystal, and there's not much helpful info on it online. I've searched for this for hours, and no solution.
When I query this field it returns a value between 0-10 . In my report I need to display this as a text(example: "2006-2007" if 6 was returned). Currently I'm using a Switch function. I was wondering is there is an easier way to do this using a lookup table or something like that. Thanks..
Hi, In my report, I have a table that displays all the data from query. I need to take the value of the 3rd row,2nd column of the table and display in a text box. I tried to do like:
=ReportItems("TextBox2").Value., where TextBox2 is the 3rd row,2nd column of the table. This returns just the first row value of the seleted data. But, I need the 3rd row value.
Hi, I am trying to work ouyt how to dislplay text from an SQL database onto the page whilst keeping the correct formatting, mainly the paragraph breaks. When I try using a label the text comes out as one long line instead of being seperated accordingly as it was done when written in a multiline textbox. I am currently achieving this by writing the text to a txt file and then displaying it dynamically by inserting each line into a new table row and then adding these to a table, but I would much rather store them in the databse along with the other information that is collected with it instead. Someone told me to use a textbox to achieve this but the problem is that this is not crawlable for the search engine.
I have database fields that contain RTF text. If I use the default Textbox in SSRS 2008 Report Designer, I get all the RTF formating characters, which makes for a VERY ugly report.Is there another control I can place on my report that will take the RTF formated text and display it properly? I can do this in Crystal Reports, but I'm converting to SSRS 2008 so I need to be able to handle RTF formated text.
Hey All, This is really simple basic question, and it's just so I can start to learn about MVS. I have a sql-database called "Test" with a Table called "Agents" with just three colulms "ID", "FNAME" and "LNAME". On the Default Page I have three Textboxes and a submit Button, All I want to do is type "Select" criteria in Textbox1 and have Textbox2 Display the "Fname" and Textbox3 Display the "Lname". (Using VB in ASPX) Dim i As New SqlDataSource() i.ConnectionString = ConfigurationManager.ConnectionStrings("Test").ToString() i.SelectCommandType = SqlDataSourceCommandType.Text i.SelectCommand = ((((((Now What???)))))))
Im trying to display data from a database based on an input value. The value in the Label12.Text which is("hotmail") is the input value thats stored in the database, this value is been searched for in the strSQL. Dim strSQL As String = "SELECT Name FROM Jobseeker WHERE Email='" & Label12.Text & "' " strSQL = Label5.Text
the code builds successfully, but Label5.Text appears blank.
Got a question here and as I am no expert programmer, this should be easy for you gurus. I have this fairly generic code I've created where I return data from an SQL table in a DataList control. I want to take it to the next level and return only the last record in the table, but I am unsure of how to do that. Perhaps I shouldn't even be using a DataList control, I'm not sure.
I have the following stored procedure in SQL 2000 and would like todiplay the database name where data is drawn from. I'm using 4databases db1, db2, db3, db4 which all have the same table (Table1)with identical column names (Surname, GivenNames).CREATE PROCEDURE [dbo].[x_searchwildcard] @varSurname VARChar(25)ASSelect a.Surname, a.GivenNamesFrom [db1]..Table1 As aWhere a.Surname LIKE @varSurname + '%'UNIONSelect a.Surname, a.GivenNamesFrom [db2]..Table1 As aWhere a.Surname LIKE @varSurname + '%'UNIONSelect a.Surname, a.GivenNamesFrom [db3]..Table1 As aWhere a.Surname LIKE @varSurname + '%'UNIONSelect a.Surname, a.GivenNamesFrom [db4]..Table1 As aWhere a.Surname LIKE @varSurname + '%'Order By a.Surname,a.GivenNamesGOI tried the followingSelect a.Surname, a.GivenNames, db_name()However it only gave me the name of the database where the storedprocedure is kept (in my case 'Common')I was hoping it would display results something like the followingSurname GivenNames Database------- ---------- --------Fred Smith db1Freddy Smith db2Fred Smith db3Fred Smithe db3Fred Smith db4Fred Smithye db4Instead I receiveSurname GivenNames Database------- ---------- --------Fred Smith commonFreddy Smith commonFred Smith commonFred Smithe commonFred Smith commonFred Smithye commonAny ideas?ThanksRick
can some one help me. im using visual studio.net 2005. its a web application.i have a database with attribute name logo. so i want to upload an image and save it into the database and than display it into the image box to preview how the image looks like.can some one please help me as i am very new in using C# codes and visual studio.net 2005
Can this be done in ASP.Net, as it stands my database views in my ASP.Net application are just standard Unlike the view in MS Access which shows the collapsable linked data below the data (from a different table)
Hello, I have around 7 ntext fields in my data base table and I am getting data from the data base table through executing stored procedure, But when I am displaying data using record set, few of the ntext fields in recored set are empty .Iam sure that these are having data in table. I am not sure why recordset is lossing that ntext field data?Because of this I am unable to display that data in web form. any ideas really appriciated. Thanks Ram
I am using SQL Server 2005 and SSRS 2005, and I am trying to display a PDF (image datatype, application/pdf filetype) from a SQL Database. There is no MIME option for PDF, so it seems my options are limited. Is there a way to display the PDF, or maybe convert the binary data at the database level?
Hi I have to populate some datas from sql server database and display it directly in a CSV Format or CSV file. When i run the project it should provide me an option to whether open or save or cancel the file. when i click open it should be opened and be viewed in a excel sheet in CSV format and when i click save it should ask the destination folder and should be saved there in CSV format and when i click cancel it should be cancelled and the application should be closed. pls note that all these actions should happen in the same browser and should not be redirected to anyother page. Can anybody give me the detailed description and code in Asp.Net using C# .It's very Urgent. RegardsVijay.
I executed the below query and getting the capacity values only for master database.All other DB shows NULL values for spaceused. I'm actually looking for a query to get all the capacity information other than using temp table and the procedures. Is there any way using SQL query ONLY.
select db.[dbid] as 'DB ID', db.[name] as 'Database Name', af.[name] as 'Logical Name', convert(decimal(12,2),round(size/128.000,2)) as FileSizeMB, convert(decimal(12,2),round(fileproperty(db.name,'SpaceUsed')/128.000,2)) as SpaceUsedMB from sys.sysdatabases db inner join sys.sysaltfiles af on db.dbid = af.dbid
Below is the output
DB ID Database Name Logical Name FileSizeMB SpaceUsedMB 1 master master 4.00 3.44 1 master mastlog 2.00
I am using the following plumbing code to search a database column for a keyword. I can't use full-test indexing so I came up w/ this work around. But It has many flaws so I'm looking for a better way. Thx in advance.
'Open sql connection SqlConnection1.Open()
Dim datareader2 As SqlClient.SqlDataReader datareader2 = cmdFindRowsWithKeyword.ExecuteReader Dim strMsg As String Dim intRowToFlag As Integer Dim strRowsToGet As String Dim strKeywordAsTyped As String Dim strKeywordAllCaps As String Dim strKeywordAllLower As String Dim strKeywordFirstLetterCap As String Dim FirstLetter As String
'Assign keyword as typed to variable strKeywordAsTyped = txtSearchFor.Text 'Assign keyword as typed to variable then convert it to all uppercase strKeywordAllCaps = txtSearchFor.Text strKeywordAllCaps = strKeywordAllCaps.ToUpper 'Assign keyword as typed to variable then convert it to all lowercase strKeywordAllLower = txtSearchFor.Text strKeywordAllLower = strKeywordAllLower.ToLower 'Assign keyword as typed to variable then convert it so just the first letter is in uppercase strKeywordFirstLetterCap = txtSearchFor.Text FirstLetter = strKeywordFirstLetterCap.Chars(0) FirstLetter = FirstLetter.ToUpper strKeywordFirstLetterCap = strKeywordFirstLetterCap.Remove(0, 1) strKeywordFirstLetterCap = strKeywordFirstLetterCap.Insert(0, FirstLetter)
'If the string contains the keyword as typed in all caps all lowercase or w/ the 1st letter in caps then flag that row. If strMsg.IndexOf(strKeywordAsTyped) <> -1 Or strMsg.IndexOf(strKeywordAllCaps) <> -1 Or strMsg.IndexOf(strKeywordAllLower) <> -1 Or strMsg.IndexOf(strKeywordFirstLetterCap) <> -1 Then
cmdFlagRowsWithKeyword.Parameters("@recid").Value = intRowToFlag SqlConnection2.Open() Dim datareader3 As SqlClient.SqlDataReader datareader3 = cmdFlagRowsWithKeyword.ExecuteReader datareader3.Close() SqlConnection2.Close()
I have a SQL SERVER database which has Articles Table. This table contains "Description" field which is of type "text". I am trying to insert 800- 1000 words of data into this field. This data also contains code snippets. I dont know for some reason it only inserts one or two lines and thats it. No error is being thrown. I am using multiline textbox to enter the data into the database. any ideas
It displays something like this:
test 1
By AzamSharp
Creating XML Men // This is very long text. Actually its the whole article but it only displays three words
I have a SQL Server database. The data from a table is populated in the table and can do a regular display query on a record without issue.
Problem is when I pull the data into a form the data doesn't show up in some form fields for editing.
I am building a backend for the manager to make updates and changes and this is vital. Does anyone know if it has something to do with a database setting or has had a similar issue in the past?
The reason I think its a database setting is becuase the same table converted into MS Access has no problem populating the text boxs and text areas.
We replicate a SQL2000 database (DataBaseA) to a SQL2000 database (DataBaseB) by using the Restore function and hasn't change its logical name but only the physical data path and file name. It is running fine for a year. We use the same way to migrate the DataBaseB to a new SQL2005 server with the Restore function and the daily operation is running perfect. However, when we do the Backup of DatabaseB in the SQL2005, it just prompt the error message
System.Data.SqlClient.SqlError: The backup of full-text catalog 'DataBaseA' is not permitted because it is not online. Check errorlog file for the reason that full-text catalog became offline and bring it online. Or BACKUP can be performed by using the FILEGROUP or FILE clauses to restrict the selection to include only online data. (Microsoft.SqlServer.Smo)
Please note we left the DataBaseA in the old SQL2000 server.
Please help on how we can delete the Full-text catalog from DatabaseB so we can do a backup
I used to do this with classic asp but I'm not sure how to do it with .net.Basically I would take a table of Categories, Then I would loop through those. Within each loop I would call another stored procedure to get each item in that Category. I'll try to explain, Lets say category 2 has a player Reggie Bush and a player Drew Brees, and category 5 has Michael Vick, but the other categories have no items.Just for an example.. Category Table: ID Category1 Saints2 Falcons3 Bucaneers4 Chargers5 FalconsPlayer Table:ID CategoryID Player News Player Last Updated1 1 Reggie Bush Poetry in motion 9/21/20062 1 Drew Brees What shoulder injury? 9/18/20063 5 Michael Vick Break a leg, seriously. 9/20/2006 Basically I would need to display on a page:SaintsReggie BushPoetry in MotionFalconsMichael VickBreak a leg, seriously.So that the Drew Brees update doesnt display, only the Reggie Bush one, which is the latest.I have my stored procedures put together to do this. I just don't know how to loop through and display it on a page. Right now I have two datareaders in the code behind but ideally something like this, I would think the code would go on the page itself, around the html.
Hello friends.... I am looking for 2 things(using c#.net or vb.net and sql svr 2000) 1.convert data from sql server 2000 database (say customers table from northwinds database) to a text file(separated by commas or just plain space) 2.Insert the data from text file back to database. Can someone pls give me the detailed code to achieve this....really need this on urgent basis.......Thank You.
Hello everyone, I am absolutely stumped on why I cannot get a user inputted value into my SQL database. I have a two textboxes and a button. The text inserted in the textbox needs to get into the table in the database when the button is clicked. .aspx file <asp:SqlDataSource ID="QuizTitleDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:QuizSQLConnection %>" SelectCommand="SELECT [Title] FROM [StatsTable]" InsertCommand="INSERT INTO StatsTable (ID, Title, NumberOfQuestions, HighestScore, LowestScore) VALUES (2, @QuizNameTextBox, @QuestionNumTextBox, 0, 0)"> <InsertParameters> <asp:Parameter Name="QuizNameTextBox" /> <asp:Parameter Name="QuestionNumTextBox" /> </InsertParameters> </asp:SqlDataSource>
Hi,I would like to use keywords inside a record to search for - like asearchengine.How can I design the table? Right now I would store data in Memo-Column in aformat like ";apple;banana;lemon;". I would use a INSTR(ring)-function - butI wonder if the performance is still OK then - even when I index the field.Are there maybe even better ways?Thanx in advance.Greg
Maybe a totally newbie question - I need to find some text in SQL database, I have no idea in which table it may be. Can I do it through SQL Management Studio 2005 or do I need some other utility? What would you suggest then?
Hi,I would like to have a full-text search from a sql server database in my aspx page. I have tried to do it by creating a Dataset with a DataTable where there is a query like: SELECT title, yearFROM ProjectsWHERE title like N'%@Search%' Problem is with the like operator - the visual studio does not reconize the @Search as a parameter, as it reconnizes it in the query below (which works fine by the way): SELECT Projects.*, theme AS Expr1FROM ProjectsWHERE (theme = @theme) Can anybody help me how to deal with this problem, which is the best way to have a full text search? Cheers, ArtoV
Hi, I am saving a couple of paragraphs of text into a varchar(max) field in a SQL database table. But when I try to use display the information again, then all the linefeed and return characters seem to be removed. How do I keep this text formating in the database field? I am sure that I am missing something simple here, but I can not figure out what. Can someone please help with some advise? Thanks RegardsJan
Hello Everyone, I would like to import a text file which contains one string (a large integer) per line not separated by commas or anything else except a carriage return. Does anyone know of an easy way to store this in a database file? I'm open to suggestions if there is more than one way to save this kind of information within a database. I have SQL server 2005 developer edition if that helps in any way. I'm also starting to learn about Linq so if there is some other way you would store this information for that purpose I would love to hear about that as well. C# code is preferable, but I can use the automatic translators if that's all you have. By the way, I'm a newbie to this subject (if you couldn't tell). Thanks in advance. Robert
Hi, I am having three text box which accepts user data & insert that in sql database. But I am not able to do this , I think this is the simplest of all . Can somebody plz tell me how this can be done from scratch that is connection string & settings in web.config ? Plz guide using C#ThanksRegards,-Sunny,
Hi All, I want to load a text file into database without using Bulk Insert. I readed the text file and kept in a datatable. I need to insert this data into database. how can i bing data in datatable to dataset. how can i update changes in dataset to database. Please help me.... Thank you.
Just a quick question to ask what is the best field to store the data held in a rich text box/control. Just want to make sure that i get it right first time you know. Not sure about the amount of characters that needs held but its going to be quite a lot as this field shall contain most of my pages content.