Alright. Here is what we've been trying to do.
We have a button that loads up a form. It opens up a form and there is a Table. Its the history table. Well, the way this table is loaded is we run a function known as HistoryTableSelectSubset. Now, this has worked very fine! Not a problem.
This is our problem. We want three columns in this table. First, QueryDate (WORKS!). Second, SQL (WORKS!). Third, MYNEWCOLUMN (Fail). What we want in this third column is basically the SQL column but with it all word wrapped.
So, instead of seeing only the first line of the SQL on the table if it is written like this:
SELECT *
FROM History
WHERE Dogs = Collie
We'd see this:
SELECT * FROM History WHERE Dogs = Collie
Here is the code we've tried thus far.
Any help would be appreciated. I hope this makes sense.Code:Public Function HistoryTableSelectSubset(ByVal maxRows As Integer, ByVal blnUseTree As Boolean) As DataTable Dim strSQL As String Dim dt As New DataTable InitializeConnection(conn) conn.MaxRecords = maxRows strSQL = "SELECT TOP (" & maxRows & ") SQL, QUERYDATE, Replace(Replace(CAST(sql AS NCHAR(1000)), unicode(10), ''), unicode(13), '') AS MYNEWCOLUMNNAME FROM HISTORY WHERE NODETYPE = '" & ApplicationConstants.QUERY_DATA & "' ORDER BY QUERYDATE DESC" dt = conn.ExecuteQueryDT(strSQL) Return dt End Function




Reply With Quote