Showing posts with label dear. Show all posts
Showing posts with label dear. Show all posts

Wednesday, March 21, 2012

Rich TextBox with Picture and Text

Dear All

I want to create a RichTextBox, and then i want to show picture and Text at a time, suppose

Welcome to MSDN Forum

how can i accompalished this task.

Thanks

You're not really asking a SQL question. What development tool and language are you using to accomplish this? I can move the question to the correct forum based on your answer.

Mike

|||

Sorry for missplaced thread, this problem is already solved, any one interested can refere to following URL

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=667916&SiteID=1

sql

RGB background color problem in Report Designer

Dear Report Designer Developers,
FYI - when I am using (e.g in a table) a RGB background color (e.g.
="#003399â' = blue) instead of a color of the selectbox there is always a
white background displayed in the Report Designer (layout view). Together
with a white font color I do not see anything in the Designer (white font on
displayed white background - instead the correct RGB background color) :-(
maybe you can change this in one of the next versions...
thx a lot
WolfgangYou can always send bugs/wishes to the following places just to make sure
your concern gets heard:
mswish@.microsoft.com
http://www.microsoft.com/mswish
--
Adrian M.
MCP
"Wolfgang Himmelsbach" <WolfgangHimmelsbach@.discussions.microsoft.com> wrote
in message news:C5710EBA-7379-4155-ADBE-3C8F69DC406E@.microsoft.com...
> Dear Report Designer Developers,
> FYI - when I am using (e.g in a table) a RGB background color (e.g.
> ="#003399" = blue) instead of a color of the selectbox there is always a
> white background displayed in the Report Designer (layout view). Together
> with a white font color I do not see anything in the Designer (white font
> on
> displayed white background - instead the correct RGB background color) :-(
> maybe you can change this in one of the next versions...
> thx a lot
> Wolfgang|||ok! thx. :-)
"Adrian M." wrote:
> You can always send bugs/wishes to the following places just to make sure
> your concern gets heard:
> mswish@.microsoft.com
> http://www.microsoft.com/mswish
> --
> Adrian M.
> MCP
>
> "Wolfgang Himmelsbach" <WolfgangHimmelsbach@.discussions.microsoft.com> wrote
> in message news:C5710EBA-7379-4155-ADBE-3C8F69DC406E@.microsoft.com...
> > Dear Report Designer Developers,
> >
> > FYI - when I am using (e.g in a table) a RGB background color (e.g.
> > ="#003399" = blue) instead of a color of the selectbox there is always a
> > white background displayed in the Report Designer (layout view). Together
> > with a white font color I do not see anything in the Designer (white font
> > on
> > displayed white background - instead the correct RGB background color) :-(
> >
> > maybe you can change this in one of the next versions...
> >
> > thx a lot
> > Wolfgang
>
>|||Instead of using an expression-based color ="#003399", you should just use a
constant #003399.
Robert M. Bruckner
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Wolfgang Himmelsbach" <WolfgangHimmelsbach@.discussions.microsoft.com> wrote
in message news:C5710EBA-7379-4155-ADBE-3C8F69DC406E@.microsoft.com...
> Dear Report Designer Developers,
> FYI - when I am using (e.g in a table) a RGB background color (e.g.
> ="#003399" = blue) instead of a color of the selectbox there is always a
> white background displayed in the Report Designer (layout view). Together
> with a white font color I do not see anything in the Designer (white font
> on
> displayed white background - instead the correct RGB background color) :-(
> maybe you can change this in one of the next versions...
> thx a lot
> Wolfgang|||thx for your information
"Robert Bruckner [MSFT]" wrote:
> Instead of using an expression-based color ="#003399", you should just use a
> constant #003399.
>
> --
> Robert M. Bruckner
> Microsoft SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Wolfgang Himmelsbach" <WolfgangHimmelsbach@.discussions.microsoft.com> wrote
> in message news:C5710EBA-7379-4155-ADBE-3C8F69DC406E@.microsoft.com...
> > Dear Report Designer Developers,
> >
> > FYI - when I am using (e.g in a table) a RGB background color (e.g.
> > ="#003399" = blue) instead of a color of the selectbox there is always a
> > white background displayed in the Report Designer (layout view). Together
> > with a white font color I do not see anything in the Designer (white font
> > on
> > displayed white background - instead the correct RGB background color) :-(
> >
> > maybe you can change this in one of the next versions...
> >
> > thx a lot
> > Wolfgang
>
>

Tuesday, March 20, 2012

Revoke execute permission from a login

Dear All,

I need to revoke execute permission from sp_configure (SP) from a user named(a) which do not exists in master database.

Regards

Mohd sufian

Why do you need/want to do this? Normal users can only use sp_configure to query the system settings; they cannot change the settings. See http://msdn2.microsoft.com/en-us/library/ms188787.aspx.

You cannot revoke the permission from a, because a is not granted the permission to EXECUTE sp_configure.

The permission to execute sp_configure is instead granted to the public role. You could revoke this one, but this is most likely not what you want, as you would then have to grant the permission explicitly to those you want to have it.

Instead, you can create the user a in the master database and explicitly DENY EXECUTE permission on sp_configure.

Thanks
Laurentiu

Wednesday, March 7, 2012

Returning Text + Column

Dear All
CREATE TABLE [dbo].[Tester] (
[ID] [int] IDENTITY (1, 1) NOT NULL ,
[TesterText] [char] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Tester] WITH NOCHECK ADD
CONSTRAINT [PK_Tester] PRIMARY KEY CLUSTERED
(
[ID]
) ON [PRIMARY]
GO
insert into Tester (TesterText) Values ('AAAA')
insert into Tester (TesterText) Values ('BBBB')
insert into Tester (TesterText) Values ('CCCC')
insert into Tester (TesterText) Values ('DDDD')
Given the above Schema and insert I would like to return a varchar with text
+ the column TesterText, so in this case I would like a varchar with 'Hello
AAAA;Hello BBBB;Hello CCCC;Hello DDDD;'.
I would rather not use cursors.
TIA
JJulie
Why not doing shuch things on the client side
I did not check NULLs and for another world it does not work as well
DECLARE @.v VARCHAR(100)
SET @.v=''
SELECT @.v=@.v+''+TesterText+';'+'Hello' FROM Tester
SELECT REPLACE(LEFT(@.v,LEN(@.v)-6),' ','')+';'
"Julie" <Julie@.discussions.microsoft.com> wrote in message
news:3C344282-FD6C-46DC-B051-1830200B247B@.microsoft.com...
> Dear All
> CREATE TABLE [dbo].[Tester] (
> [ID] [int] IDENTITY (1, 1) NOT NULL ,
> [TesterText] [char] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
> ) ON [PRIMARY]
> GO
> ALTER TABLE [dbo].[Tester] WITH NOCHECK ADD
> CONSTRAINT [PK_Tester] PRIMARY KEY CLUSTERED
> (
> [ID]
> ) ON [PRIMARY]
> GO
> insert into Tester (TesterText) Values ('AAAA')
> insert into Tester (TesterText) Values ('BBBB')
> insert into Tester (TesterText) Values ('CCCC')
> insert into Tester (TesterText) Values ('DDDD')
> Given the above Schema and insert I would like to return a varchar with
text
> + the column TesterText, so in this case I would like a varchar with
'Hello
> AAAA;Hello BBBB;Hello CCCC;Hello DDDD;'.
> I would rather not use cursors.
> TIA
> J
>|||The best place for this kind of non-relational concatenation is on the
client, not in the database. However, see http://www.aspfaq.com/2529 for a
starting point if you really, really, really want to do this in the
database.
On 3/15/05 6:05 AM, in article
3C344282-FD6C-46DC-B051-1830200B247B@.microsoft.com, "Julie"
<Julie@.discussions.microsoft.com> wrote:

> Dear All
> CREATE TABLE [dbo].[Tester] (
> [ID] [int] IDENTITY (1, 1) NOT NULL ,
> [TesterText] [char] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
> ) ON [PRIMARY]
> GO
> ALTER TABLE [dbo].[Tester] WITH NOCHECK ADD
> CONSTRAINT [PK_Tester] PRIMARY KEY CLUSTERED
> (
> [ID]
> ) ON [PRIMARY]
> GO
> insert into Tester (TesterText) Values ('AAAA')
> insert into Tester (TesterText) Values ('BBBB')
> insert into Tester (TesterText) Values ('CCCC')
> insert into Tester (TesterText) Values ('DDDD')
> Given the above Schema and insert I would like to return a varchar with te
xt
> + the column TesterText, so in this case I would like a varchar with 'Hell
o
> AAAA;Hello BBBB;Hello CCCC;Hello DDDD;'.
> I would rather not use cursors.
> TIA
> J
>|||Thanks Guys,
I have given Uri the 'answered' as he was the first :D
Anyway what I'm actually doing is preparing a number of Dynamic SQL
Statments for a nightly batch run (we have the column + table names in a
table) however I couldn't find a way of concatinating them together.
Anyway thanks for that
J
"Julie" wrote:

> Dear All
> CREATE TABLE [dbo].[Tester] (
> [ID] [int] IDENTITY (1, 1) NOT NULL ,
> [TesterText] [char] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
> ) ON [PRIMARY]
> GO
> ALTER TABLE [dbo].[Tester] WITH NOCHECK ADD
> CONSTRAINT [PK_Tester] PRIMARY KEY CLUSTERED
> (
> [ID]
> ) ON [PRIMARY]
> GO
> insert into Tester (TesterText) Values ('AAAA')
> insert into Tester (TesterText) Values ('BBBB')
> insert into Tester (TesterText) Values ('CCCC')
> insert into Tester (TesterText) Values ('DDDD')
> Given the above Schema and insert I would like to return a varchar with te
xt
> + the column TesterText, so in this case I would like a varchar with 'Hell
o
> AAAA;Hello BBBB;Hello CCCC;Hello DDDD;'.
> I would rather not use cursors.
> TIA
> J
>

Tuesday, February 21, 2012

returning my blob next problem

Dear All,

I am trying to run the some code which is designed to return an image blob. However it throws an exception

Exception Details:System.IndexOutOfRangeException: ToolbarLogo

Source Error:

Line 55: Response.ClearHeaders() ;
Line 56: Response.ContentType = "image/gif";
Line 57: byte[] arr = (byte[]) sdr["ToolbarLogo"];
Line 58:
Line 59: Response.BinaryWrite(arr);

I can run the sql SP query fine and it returns binary data ok:

Does anyone have any pointers I should look at as to why the error is thrown? Do you think my blobs are corrupt?

Here is the code:

Thank you for takin the time to look


public class GetBanner : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Image Image1;

protected void Page_Load(object sender, EventArgs e)
{
SqlDataReader sdr = null;

int brand_id = 0;
try
{
brand_id = Int32.Parse(Request.QueryString["brand_id"].ToString());
}
catch (Exception)
{
// commented below. Since it is a image handleer
//Response.Write("<HTML>You must supply a brand_id</HTML>");
return;
}

{
SqlDataAdapter daGetBanner = new SqlDataAdapter();


string connectionInfo = ConfigurationSettings.AppSettings["ConnectionInfo"];
using(SqlConnection dbConnection = new SqlConnection(connectionInfo))

{
SqlCommand objCommand = new SqlCommand("usp_get_new_guid_r", dbConnection);
objCommand.CommandType = CommandType.StoredProcedure;

dbConnection.Open();
sdr = objCommand.ExecuteReader();
while (sdr.Read())
{
Response.ClearHeaders() ;
Response.ContentType = "image/gif";
byte[] arr = (byte[]) sdr["ToolbarLogo"];

Response.BinaryWrite(arr);
Response.Flush();
}
sdr.Close();

dbConnection.Close();
}
}
}

if(sdr["ToolbarLogo"] != null ||sdr["ToolbarLogo"] != DBNull.Value )

{

byte[] arr = (byte[]) sdr["ToolbarLogo"];

Response.BinaryWrite(arr);

Response.Flush();

}