Wednesday, March 7, 2012
how to retrieve full text of procedure definition from syscom
getting more text. But if I have QA return the information as Text all I ge
t
is this:
Text
----
Whereas if I leave QA in Grid mode then I get information from the text
field. Is there something else I need to do to QA to get the information in
textmode? The procedure isn't that big (I just didn't want to have to go to
EM and dig).
May I ask how you configure QA to return full column width?
"Kalen Delaney" wrote:
> Hi Rich
> Why don't you try returning the results in text format instead of grid? An
d
> only select the text column:
> select text from syscomments where
> text like '%Insert Into CompareSubscribers%'
> Make sure you configure QA to return the full column width.
> --
> HTH
> Kalen Delaney, SQL Server MVP
> www.solidqualitylearning.com
>
> "Rich" <Rich@.discussions.microsoft.com> wrote in message
> news:164BF9D0-FEDE-4B37-8CAE-9A8F7257F118@.microsoft.com...
>
>Rich
In QA, you can use the Tools Menu, select Options and choose the Results
tab. There you can set the maximum number of characters per column.
I have no idea why you are not seeing anything in text mode. I usually see
more in text mode than in grid mode. Maybe changing the number of characters
will help.
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"Rich" <Rich@.discussions.microsoft.com> wrote in message
news:007BE28C-386E-4AE2-975C-40F27EE8E7AD@.microsoft.com...
> Thank you for your reply. By selecting only the text column I am in fact
> getting more text. But if I have QA return the information as Text all I
> get
> is this:
> Text
> ----
> Whereas if I leave QA in Grid mode then I get information from the text
> field. Is there something else I need to do to QA to get the information
> in
> textmode? The procedure isn't that big (I just didn't want to have to go
> to
> EM and dig).
> May I ask how you configure QA to return full column width?
> "Kalen Delaney" wrote:
>
>|||OK. (sorry for my ineptness). I changed the char count to 2000 from the
default 256. Much better. Interestingly, if I select textmode for results,
it works fine for most of the queries. And for textmode (major brain dump
here), it turns out that the procedure I wanted to look at had all kinds of
leading spaces, lines... Once I scrolled down the results window I could se
e
the text. And yes, textmode much better for this kind of stuff.
Thanks very much for your help.
"Kalen Delaney" wrote:
> Rich
> In QA, you can use the Tools Menu, select Options and choose the Results
> tab. There you can set the maximum number of characters per column.
> I have no idea why you are not seeing anything in text mode. I usually see
> more in text mode than in grid mode. Maybe changing the number of characte
rs
> will help.
> --
> HTH
> Kalen Delaney, SQL Server MVP
> www.solidqualitylearning.com
>
> "Rich" <Rich@.discussions.microsoft.com> wrote in message
> news:007BE28C-386E-4AE2-975C-40F27EE8E7AD@.microsoft.com...
>
>
Friday, February 24, 2012
HOW to Retrieve an image from sql server and display it in ASP.net using "imagemap or image
Ok, the problem is that , i have a field called "Attach" in sql of type image, when selecting it , the field is getting data of type BYTE(). which am being unable to display them on an Image on the panel.
using the following vb.net code:
'Dim sel2 As String
'Dim myCom As SqlCommand
'Dim conn As New SqlConnection
'Dim drr As SqlDataReader
'Dim image As System.Drawing.Image
'sel2 = "select * from attach where att_desc = '" & DropDownList1.SelectedItem().Text & "' and doc_code = " & w_doc_code & " and subcode = " & w_doc_subcode & " and doc_num= " & w_doc_num & " "
'conn.ConnectionString = ("server=developer01;uid=sa;password=aims;database=DVPSOC;timeout=45")
'myCom = New SqlCommand(sel2, conn)
'conn.Open()
'drr = myCom.ExecuteReader()
'If drr.Read Then
' Me.ImageMap1.ImageUrl = drr.Item("attach")
'End If
'conn.Close()
Am getting an exeption on the following line Me.ImageMap1.ImageUrl = drr.Item("attach")
saying: Conversion from type 'Byte()' to type 'String' is not valid.
knowing that i tried converting using ToString but it's not getting any output then.
thanks for your help.
a example in C# as below:
try
{
con = new SqlConnection(constr);
cmd = new SqlCommand("select photopath,Photo from employees where employeeid=14", con);
con.Open();
dr = cmd.ExecuteReader();
while(dr.Read())
{
if (!dr.IsDBNull(1))
{
byte[] photo = (byte[])dr[1];
MemoryStream ms = new MemoryStream(photo);
pictureBox1.Image = Image.FromStream(ms);
}
}
}
catch (Exception ex)
{
dr.Close();
cmd.Dispose();
con.Close();
MessageBox.Show(ex.Message);
}
hope can help u a little
|||Sorry but that is not the answer to the question. picturebox cannot be used in ASP.Net.
HOW to Retrieve an image from sql server and display it in ASP.net using "imagemap or image
Ok, the problem is that , i have a field called "Attach" in sql of type image, when selecting it , the field is getting data of type BYTE(). which am being unable to display them on an Image on the panel.
using the following vb.net code:
'Dim sel2 As String
'Dim myCom As SqlCommand
'Dim conn As New SqlConnection
'Dim drr As SqlDataReader
'Dim image As System.Drawing.Image
'sel2 = "select * from attach where att_desc = '" & DropDownList1.SelectedItem().Text & "' and doc_code = " & w_doc_code & " and subcode = " & w_doc_subcode & " and doc_num= " & w_doc_num & " "
'conn.ConnectionString = ("server=developer01;uid=sa;password=aims;database=DVPSOC;timeout=45")
'myCom = New SqlCommand(sel2, conn)
'conn.Open()
'drr = myCom.ExecuteReader()
'If drr.Read Then
' Me.ImageMap1.ImageUrl = drr.Item("attach")
'End If
'conn.Close()
Am getting an exeption on the following line Me.ImageMap1.ImageUrl = drr.Item("attach")
saying: Conversion from type 'Byte()' to type 'String' is not valid.
knowing that i tried converting using ToString but it's not getting any output then.
thanks for your help.
a example in C# as below:
try
{
con = new SqlConnection(constr);
cmd = new SqlCommand("select photopath,Photo from employees where employeeid=14", con);
con.Open();
dr = cmd.ExecuteReader();
while(dr.Read())
{
if (!dr.IsDBNull(1))
{
byte[] photo = (byte[])dr[1];
MemoryStream ms = new MemoryStream(photo);
pictureBox1.Image = Image.FromStream(ms);
}
}
}
catch (Exception ex)
{
dr.Close();
cmd.Dispose();
con.Close();
MessageBox.Show(ex.Message);
}
hope can help u a little
|||Sorry but that is not the answer to the question. picturebox cannot be used in ASP.Net.
HOW to Retrieve an image from sql server and display it in ASP.net using "imagemap or i
Ok, the problem is that , i have a field called "Attach" in sql of type image, when selecting it , the field is getting data of type BYTE(). which am being unable to display them on an Image on the panel.
using the following vb.net code:
'Dim sel2 As String
'Dim myCom As SqlCommand
'Dim conn As New SqlConnection
'Dim drr As SqlDataReader
'Dim image As System.Drawing.Image
'sel2 = "select * from attach where att_desc = '" & DropDownList1.SelectedItem().Text & "' and doc_code = " & w_doc_code & " and subcode = " & w_doc_subcode & " and doc_num= " & w_doc_num & " "
'conn.ConnectionString = ("server=developer01;uid=sa;password=aims;database=DVPSOC;timeout=45")
'myCom = New SqlCommand(sel2, conn)
'conn.Open()
'drr = myCom.ExecuteReader()
'If drr.Read Then
' Me.ImageMap1.ImageUrl = drr.Item("attach")
'End If
'conn.Close()
Am getting an exeption on the following line Me.ImageMap1.ImageUrl = drr.Item("attach")
saying: Conversion from type 'Byte()' to type 'String' is not valid.
knowing that i tried converting using ToString but it's not getting any output then.
thanks for your help.
a example in C# as below:
try
{
con = new SqlConnection(constr);
cmd = new SqlCommand("select photopath,Photo from employees where employeeid=14", con);
con.Open();
dr = cmd.ExecuteReader();
while(dr.Read())
{
if (!dr.IsDBNull(1))
{
byte[] photo = (byte[])dr[1];
MemoryStream ms = new MemoryStream(photo);
pictureBox1.Image = Image.FromStream(ms);
}
}
}
catch (Exception ex)
{
dr.Close();
cmd.Dispose();
con.Close();
MessageBox.Show(ex.Message);
}
hope can help u a little
|||Sorry but that is not the answer to the question. picturebox cannot be used in ASP.Net.