Showing posts with label type. Show all posts
Showing posts with label type. Show all posts

Tuesday, March 6, 2012

"Password" data type

Hi,
I have a table which store the UserID and password in SQL
Server 2000.
Right now I use the "varchar" for the password column, but
when someone have the odbc link to the data from access or
crystal report, they can very easy to see all the password.
I am looking for something like in Access, you can put
the "Password" input mask, so when people open the
database, they can only see something like "****".
Thanks
HLHi,
Why dont you create SQL Server based logins, SO that passwords are encryted
and can not be decrypted. This will be the highest security mechnaism you
could go.
Still you could see the below article to encrypt a column.
http://www.mssqlserver.com/faq/general-encrypt.asp
Thanks
Hari
SQL Server MVP
"HL" wrote:

> Hi,
> I have a table which store the UserID and password in SQL
> Server 2000.
> Right now I use the "varchar" for the password column, but
> when someone have the odbc link to the data from access or
> crystal report, they can very easy to see all the password.
> I am looking for something like in Access, you can put
> the "Password" input mask, so when people open the
> database, they can only see something like "****".
> Thanks
> HL
>
>

"Org Chart" Type Tool?

We have a list of companies in our SQL Server 2000 database. We would
like to graphically show the parent companies and subsidiary
companies. I can create a query that will list this information, but
is there a tool that can show this graphically?imani_technology_spam@.yahoo.com wrote:
> We have a list of companies in our SQL Server 2000 database. We would
> like to graphically show the parent companies and subsidiary
> companies. I can create a query that will list this information, but
> is there a tool that can show this graphically?

Visio has a wizard for producing an org chart from a datafile. you should
be able to use it to produce the desired chart.

Kennedy Fraser

Saturday, February 25, 2012

"Name" Data Type?

Standard apologies for the extreme "newbie" nature of this question...
I've just seen a batch of sample code with the following declaration:
DECLARE @.MyVar Name
"@.MyVar", in this case, is there to receive some string data from an OPENXML
operation. The contents of the variable are subsequently used to feed other
functions that take varchar's as arguments. This works successfully.
The problem is, I've never heard of a "Name" before -- I can't CAST it to
anything useful, nor can I successfully concatenate it with a "+" operator t
o
other string data. I don't believe it is actually a data type, but I'm afrai
d
I don't know what it is, and because of what it's called it's darned hard to
look up in BOL!
Any insight would be greatly appreciated. Thanks!Dan,
A user-defined data type?
Try:
EXEC sp_datatype_info
GO
--and
EXEC sp_help
GO
HTH
Jerry
"Dan Costello" <DanCostello@.discussions.microsoft.com> wrote in message
news:C4A7366D-A8D9-4AE7-90D5-AF1E9CEDC847@.microsoft.com...
> Standard apologies for the extreme "newbie" nature of this question...
> I've just seen a batch of sample code with the following declaration:
> DECLARE @.MyVar Name
> "@.MyVar", in this case, is there to receive some string data from an
> OPENXML
> operation. The contents of the variable are subsequently used to feed
> other
> functions that take varchar's as arguments. This works successfully.
> The problem is, I've never heard of a "Name" before -- I can't CAST it to
> anything useful, nor can I successfully concatenate it with a "+" operator
> to
> other string data. I don't believe it is actually a data type, but I'm
> afraid
> I don't know what it is, and because of what it's called it's darned hard
> to
> look up in BOL!
> Any insight would be greatly appreciated. Thanks!|||Jerry,
Well, now I feel really stupid! Thanks, that's got it. For the sake of
completeness, the sample code uses the "AdventureWorks" sample database,
which does in fact have a user-defined type called "Name" already in it.
--Dan
"Jerry Spivey" wrote:

> Dan,
> A user-defined data type?
> Try:
> EXEC sp_datatype_info
> GO
> --and
> EXEC sp_help
> GO
> HTH
> Jerry
> "Dan Costello" <DanCostello@.discussions.microsoft.com> wrote in message
> news:C4A7366D-A8D9-4AE7-90D5-AF1E9CEDC847@.microsoft.com...
>
>

"Name" Data Type?

Standard apologies for the extreme "newbie" nature of this question...
I've just seen a batch of sample code with the following declaration:
DECLARE @.MyVar Name
"@.MyVar", in this case, is there to receive some string data from an OPENXML
operation. The contents of the variable are subsequently used to feed other
functions that take varchar's as arguments. This works successfully.
The problem is, I've never heard of a "Name" before -- I can't CAST it to
anything useful, nor can I successfully concatenate it with a "+" operator to
other string data. I don't believe it is actually a data type, but I'm afraid
I don't know what it is, and because of what it's called it's darned hard to
look up in BOL!
Any insight would be greatly appreciated. Thanks!Dan,
A user-defined data type?
Try:
EXEC sp_datatype_info
GO
--and
EXEC sp_help
GO
HTH
Jerry
"Dan Costello" <DanCostello@.discussions.microsoft.com> wrote in message
news:C4A7366D-A8D9-4AE7-90D5-AF1E9CEDC847@.microsoft.com...
> Standard apologies for the extreme "newbie" nature of this question...
> I've just seen a batch of sample code with the following declaration:
> DECLARE @.MyVar Name
> "@.MyVar", in this case, is there to receive some string data from an
> OPENXML
> operation. The contents of the variable are subsequently used to feed
> other
> functions that take varchar's as arguments. This works successfully.
> The problem is, I've never heard of a "Name" before -- I can't CAST it to
> anything useful, nor can I successfully concatenate it with a "+" operator
> to
> other string data. I don't believe it is actually a data type, but I'm
> afraid
> I don't know what it is, and because of what it's called it's darned hard
> to
> look up in BOL!
> Any insight would be greatly appreciated. Thanks!|||Jerry,
Well, now I feel really stupid! Thanks, that's got it. For the sake of
completeness, the sample code uses the "AdventureWorks" sample database,
which does in fact have a user-defined type called "Name" already in it.
--Dan
"Jerry Spivey" wrote:
> Dan,
> A user-defined data type?
> Try:
> EXEC sp_datatype_info
> GO
> --and
> EXEC sp_help
> GO
> HTH
> Jerry
> "Dan Costello" <DanCostello@.discussions.microsoft.com> wrote in message
> news:C4A7366D-A8D9-4AE7-90D5-AF1E9CEDC847@.microsoft.com...
> > Standard apologies for the extreme "newbie" nature of this question...
> >
> > I've just seen a batch of sample code with the following declaration:
> >
> > DECLARE @.MyVar Name
> >
> > "@.MyVar", in this case, is there to receive some string data from an
> > OPENXML
> > operation. The contents of the variable are subsequently used to feed
> > other
> > functions that take varchar's as arguments. This works successfully.
> >
> > The problem is, I've never heard of a "Name" before -- I can't CAST it to
> > anything useful, nor can I successfully concatenate it with a "+" operator
> > to
> > other string data. I don't believe it is actually a data type, but I'm
> > afraid
> > I don't know what it is, and because of what it's called it's darned hard
> > to
> > look up in BOL!
> >
> > Any insight would be greatly appreciated. Thanks!
>
>

"Multiple-Step operation cannot be generated Check each status value" Error

Hi All,

I have a field 'Rowguid' of type uniqueidentifier in a table. This field is the last field in the table. In this case if I update a record through the application I don't get any error. Suppose if there are additional fields after the field Rowguid I get the error "Multiple-Step operation cannot be generated Check each status value"

For your reference I have used the following statement to add the RowGuid field

Alter table <tablename>
Add RowGuid uniqueidentifier ROWGUIDCOL NOT NULL Default (newid())

Can anyone please help me.

Thanks

SatheshPost your update statement, and any trigger code on this table.|||Where's Brett when we need him?

Logically, columns don't have any order within a table. It so happens that the current implementation of Microsoft SQL Server has a physical order, but that's implementation dependant. Relying on a column order (logical or physical) is a bug waiting to happen!

The problem is that you are not specifying a column list for your INSERT statement, you are relying on an implied order. Once you add columns so that the rowid is no longer the last column, your assumed order bytes you. If you specify the columns via a column list, this won't be a problem.DROP TABLE BadExample
GO
CREATE TABLE BadExample (
comment NVARCHAR(25)
)
GO

INSERT INTO BadExample
SELECT 'Simple case'

SELECT * FROM BadExample
GO

ALTER TABLE BadExample
ADD RowGuid uniqueidentifier ROWGUIDCOL NOT NULL
DEFAULT (newid())

INSERT INTO BadExample (comment)
SELECT 'Not as simple example'

SELECT * FROM BadExample
GO

ALTER TABLE BadExample
ADD myDate DATETIME NOT NULL
DEFAULT GetDate()
GO

INSERT INTO BadExample (comment, myDate)
SELECT 'This works!', '1950-01-02'

SELECT * FROM BadExample
GO

INSERT INTO BadExample
SELECT 'This fails', '1960-03-04'

SELECT * FROM BadExample-PatP|||The problem is that you are not specifying a column list for your INSERT statement, you are relying on an implied order.How did you come up with that from his post!?

Friday, February 24, 2012

"Live" queries in sql 2005 ?

A colleague was telling me the other day that in Sql Server 2005 there is a
special type of query you can do, whereby it runs in the background and
brings back results automatically, whenever they change. He referred to it
as something called a "live" query, but I'm not sure that's correct
terminology.
In theory you could run such a query, and sit back and watch the results
change in Query Analyser (or wherever). For example if you were monitoring
total sales, you could literally run the query and it would "auto update" in
front of your eyes, as sales increased.
Then you could theoretically write a client application with, say, a grid
which was bound to the "live query" and updated itself magically.
One could write a client app which polled the database every 2 seconds or
whatever, but that's not as efficient as picking up data *only* when it
changes.
Obviously it depends on the client limitations, but has anyone heard of such
a thing in SQL 2005?
Thanks,
Owen"Owen" <spam@.spam.com> wrote in message
news:lZOdnfeFS9oemgbZnZ2dnUVZ8smdnZ2d@.pi
pex.net...
>A colleague was telling me the other day that in Sql Server 2005 there is a
>special type of query you can do, whereby it runs in the background and
>brings back results automatically, whenever they change. He referred to it
>as something called a "live" query, but I'm not sure that's correct
>terminology.
>
Query Notification.
Query Notifications in ADO.NET 2.0
http://msdn.microsoft.com/library/d...otification.asp
David|||"David Browne" <davidbaxterbrowne no potted meat@.hotmail.com> wrote in
message news:uaX3ADllGHA.3740@.TK2MSFTNGP02.phx.gbl...
> "Owen" <spam@.spam.com> wrote in message
> news:lZOdnfeFS9oemgbZnZ2dnUVZ8smdnZ2d@.pi
pex.net...
> Query Notification.
> Query Notifications in ADO.NET 2.0
> http://msdn.microsoft.com/library/d...otification.asp
> David
Sounds about right, thanks very much indeed. !
Owen.
http://www.riptheuglybluevoidfromyourhead.com

Sunday, February 19, 2012

"insert into" with text type - newbie

Hello,

When I try "Insert Into" with a text column value that's very long, I
only get a cropped version inserted (I know because when I
programmatically access the field, it's cropped-- I'm not just
assuming this from query manager). The text column has a default size
of small, however I don't understand why it is only inserting the
default amoutn instead of the whole string. I am using "Insert Into
table (blah, blah) values (blah, 'loooooooooooooooooooooooooooong
entry')", and programmatically running that command.

I'm stumped. Why is it inserting only part of the long entry value?"vavavoomy2" <vavavoomy2@.yahoo.com> wrote in message
news:c5e42899.0310280942.177d251c@.posting.google.c om...
> Hello,
> When I try "Insert Into" with a text column value that's very long, I
> only get a cropped version inserted (I know because when I
> programmatically access the field, it's cropped-- I'm not just
> assuming this from query manager). The text column has a default size
> of small, however I don't understand why it is only inserting the
> default amoutn instead of the whole string. I am using "Insert Into
> table (blah, blah) values (blah, 'loooooooooooooooooooooooooooong
> entry')", and programmatically running that command.
> I'm stumped. Why is it inserting only part of the long entry value?

What does a "default size of small" mean? Text columns in MSSQL don't have a
variable width, are you talking about a char/varchar column?

In any case, you should probably check if you have ANSI_WARNINGS set OFF in
the connection properties for your client. By default this is on (for OLE
DB/ODBC at least), and inserting data which would be truncated gives an
error. Setting it to off suppresses the error and allows the insert to
happen.

If that isn't the case, can you post your CREATE TABLE statement, and an
INSERT statement which reproduces the problem? Also, does the error happen
when you execute the INSERT manually in Query Analyzer or only
programmatically?

Simon|||"vavavoomy2" <vavavoomy2@.yahoo.com> wrote in message
news:c5e42899.0310280942.177d251c@.posting.google.c om...
> Hello,
> When I try "Insert Into" with a text column value that's very long, I
> only get a cropped version inserted (I know because when I
> programmatically access the field, it's cropped-- I'm not just
> assuming this from query manager). The text column has a default size
> of small, however I don't understand why it is only inserting the
> default amoutn instead of the whole string. I am using "Insert Into
> table (blah, blah) values (blah, 'loooooooooooooooooooooooooooong
> entry')", and programmatically running that command.
> I'm stumped. Why is it inserting only part of the long entry value?

What does a "default size of small" mean? Text columns in MSSQL don't have a
variable width, are you talking about a char/varchar column?

In any case, you should probably check if you have ANSI_WARNINGS set OFF in
the connection properties for your client. By default this is on (for OLE
DB/ODBC at least), and inserting data which would be truncated gives an
error. Setting it to off suppresses the error and allows the insert to
happen.

If that isn't the case, can you post your CREATE TABLE statement, and an
INSERT statement which reproduces the problem? Also, does the error happen
when you execute the INSERT manually in Query Analyzer or only
programmatically?

Simon

Monday, February 13, 2012

"DISTINCT" problem...

I build an application that should show a on line magazin.
the articles in the magazin have name' article ID and "type"- "humor", "news" a ns so...
all of the article stored in a table and i use "SELECT DISTINCT type" to get the list of the types...
but' i want this types to be sorted, and if i use "ORDER BY theorder" i get an error massage- "you can't use DISTINCT with out including the column name".
so i changed to:
"SELECT DISTINCT type, theorder FROM..."
but then i get each type more then one' since the theorder column has diferent values...
how can i get the types, only one time each, and sort them?

Can you post your exact query? It should look something like this...
select distinct type from myTable order by theorder
Order by values do not have to appear in a select list, that only applies to the group by clause.

|||this is my query:cmd.CommandText = "SELECT DISTINCT type FROM tbl_paper WHERE alonNUM='" & alonNUM & "' ORDER BY theorder"and this the error massage and i copyed it from the screen:ORDER BY items must appear in the select list if SELECT DISTINCT is specified.|||This is a flaw with your data. You are saying you want to order by a field that is not distinct to each of your "types". How does the system know which one of the "theorder" fields to use for each of the "type" fields? I think you need to examine the data or how you want to display this field.
Anyhow, without getting multiple "types" back you cant do this type of query with the order by clause based on your data.

Nick|||This will happen even if your Data in the table is 100% correct. When? If you have 1:Many mapping, then you can't avoid having duplicate rows with join.
But in your case, it seems single table. So you table is not designed properly. If you add addition column to the select list then the combined value for all select columns will
be tried for distinctness. In this case {type, theorder} pair is distinct even though you might see multiple copies of the same type.|||Instead of DISTINCT, try a GROUP BY, and use a MAX() or a MIN() on the other column, like this:
SELECT
type,
MAX(theorder)
FROM
tbl_paper
WHERE
alonNUM='something'
GROUP BY
type
ORDER BY
2

This will give you one row per type, ordered by the maximum theorder value found for each type.

Thursday, February 9, 2012

"Bad variable type" error msg can't get past it.

I posted this here a few days ago, and someone said to ask on a delphi
forum. Well, I did, and also have searched everywhere I can imagine,
without luck.
My stored proc when executed from delphi 7 produces a Bad variable type
error. This happens on win2k and win98, but does not happen on XP.
It runs from query analyser both on XP and on win2k. It runs in the app on
XP.
The app creates the parameters for the sp component and assigns data types,
which I've verified match the sp.
Clearly no one here knows the exact answer, or you would have said it by
now. So how about more ideas about where to look?
JeremyHi
I assume you are using ADO? Have you checked out MDAC consistency and
versions? Have you SET NOCOUNT ON?
You may also want to post some code and DDL.
John
"JeremyGrand" wrote:

> I posted this here a few days ago, and someone said to ask on a delphi
> forum. Well, I did, and also have searched everywhere I can imagine,
> without luck.
> My stored proc when executed from delphi 7 produces a Bad variable type
> error. This happens on win2k and win98, but does not happen on XP.
> It runs from query analyser both on XP and on win2k. It runs in the app o
n
> XP.
> The app creates the parameters for the sp component and assigns data types
,
> which I've verified match the sp.
> Clearly no one here knows the exact answer, or you would have said it by
> now. So how about more ideas about where to look?
> Jeremy
>
>|||Yes, ADO. MDAC is the latest, and the win2k sps are up to date.
I will try setting nocount on. How might this help?
Here's the table I'm inserting into:
if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[AGNT_STATMENT]') and OBJECTPROPERTY(id, N'IsUserTable') =
1)
drop table [dbo].[AGNT_STATMENT]
GO
CREATE TABLE [dbo].[AGNT_STATMENT] (
[StatementNumber] [bigint] NOT NULL ,
[Item] [smallint] NOT NULL ,
[DatePosted] [smalldatetime] NULL ,
[Type] [varchar] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Debit] [float] NULL ,
[Credit] [float] NULL ,
[Balance] [float] NULL ,
[Description] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[LoanNo] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Prefix] [varchar] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Certificate] [varchar] (12) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[CommissionPercent] [float] NULL ,
[FeeDr] [money] NULL ,
[FeeCr] [money] NULL ,
[EntryDate] [smalldatetime] NULL ,
[Department] [varchar] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[PaymentStatementNumber] [bigint] NULL ,
[PaymentItem] [int] NULL ,
[PaymentAmount] [money] NULL ,
[PaymentFee] [money] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AGNT_STATMENT] WITH NOCHECK ADD
CONSTRAINT [PK_AGNT_STATMENT] PRIMARY KEY CLUSTERED
(
[StatementNumber],
[Item]
) ON [PRIMARY]
GO
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:18DADDD6-1A68-4615-97AB-55A502A51176@.microsoft.com...
> Hi
> I assume you are using ADO? Have you checked out MDAC consistency and
> versions? Have you SET NOCOUNT ON?
> You may also want to post some code and DDL.
> John
> "JeremyGrand" wrote:
>|||Hi
I would not expect SET NOCOUNT ON to make a difference unless you are
looking at returning a result set. It is not clear if you have are looking a
t
the same database/server when you experience the problem. It is also not
clear if it happens every time on the platforms that it does not work on. If
this is the same server then it points to a local problem on the clients tha
t
fail.
You may want to run SQL Profiler to see what is being sent to the database.
At a guess the most likely cause would be the date/time or money values whic
h
could be effected by the regional settings.
John
"John Bell" wrote:
> Hi
> I assume you are using ADO? Have you checked out MDAC consistency and
> versions? Have you SET NOCOUNT ON?
> You may also want to post some code and DDL.
> John
> "JeremyGrand" wrote:
>|||John, Profiler output is interesting. The trace seems to only show the
steps up to but not including the execution of the problem stored proc. I
have the execution wrapped in a try-block, and an exception is thrown. I
don't see evidence of this in the profiler trace. I've searched the output
and can't find any reference to the stored proc in question.
So, this probably implies that my ado component is not happy with the data
or parameters I'm feeding it.
On the other hand, I can consistently reproduce the error on the only 2
win2k machines I've tested, and it also is reported to fail on a win98
machine. The program consistently runs without error on at least 2 XP
machines, so this seems very OS dependent.
I've looked at regional settings (money, dates) on my own w2k machine, and
they seem normal.
I did a trace while running the stored proc on an XP machine. Here's the
line where the sp executes. Nothing leaps out at me, but maybe someone will
see something.
exec agnt_statment_InsertNew 261, NULL, 'CAN', 0.000000000000000e+000,
5.050000000000000e+002, -2.072300000000000e+004, 'XQN000000055',
'72AG99-143', 'XQN', '000000055', 3.500000000000000e+001,
0.000000000000000e+000, 0.000000000000000e+000, 'Nov 1 2005
12:00:00:000AM', '', NULL, NULL, 0.000000000000000e+000,
0.000000000000000e+000
-Jeremy

> You may want to run SQL Profiler to see what is being sent to the
> database.
> At a guess the most likely cause would be the date/time or money values
> which
> could be effected by the regional settings.
> John
>|||Hi
Are you tracing the start events?
You may want to try creating a dummy procedure with the same parameters and
see if that works, you may have to return a default result set. It will rule
out the parameter passing. You could try hard coding the parameters that you
listed and seeing if it works, then change the values to be dynamic one at a
time, alternatively you could try remove each parameter one at a time until
you don't get the error.
John
"JeremyGrand" wrote:

> John, Profiler output is interesting. The trace seems to only show the
> steps up to but not including the execution of the problem stored proc. I
> have the execution wrapped in a try-block, and an exception is thrown. I
> don't see evidence of this in the profiler trace. I've searched the output
> and can't find any reference to the stored proc in question.
> So, this probably implies that my ado component is not happy with the data
> or parameters I'm feeding it.
> On the other hand, I can consistently reproduce the error on the only 2
> win2k machines I've tested, and it also is reported to fail on a win98
> machine. The program consistently runs without error on at least 2 XP
> machines, so this seems very OS dependent.
> I've looked at regional settings (money, dates) on my own w2k machine, and
> they seem normal.
> I did a trace while running the stored proc on an XP machine. Here's the
> line where the sp executes. Nothing leaps out at me, but maybe someone wi
ll
> see something.
> exec agnt_statment_InsertNew 261, NULL, 'CAN', 0.000000000000000e+000,
> 5.050000000000000e+002, -2.072300000000000e+004, 'XQN000000055',
> '72AG99-143', 'XQN', '000000055', 3.500000000000000e+001,
> 0.000000000000000e+000, 0.000000000000000e+000, 'Nov 1 2005
> 12:00:00:000AM', '', NULL, NULL, 0.000000000000000e+000,
> 0.000000000000000e+000
> -Jeremy
>
>|||John, brilliant idea. I've created a dummy program and a dummy stored proc
and am experimenting. I can actually make a program where the stored proc
succeeds by dropping a sp component on a form, whereas creating it in code
fails on w2k boxes. I guess you've gotta say that's progress!
The evidence also seems to be supporting the notion that the problem is in
delphi. There was an issue with D7.1 last year, and I'm pursuing this at
the moment.
Thanks.
Jeremy
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:3FD30FD2-D288-46AD-94AB-1AF6B9ECEBCB@.microsoft.com...
> Hi
> Are you tracing the start events?
> You may want to try creating a dummy procedure with the same parameters
> and
> see if that works, you may have to return a default result set. It will
> rule
> out the parameter passing. You could try hard coding the parameters that
> you
> listed and seeing if it works, then change the values to be dynamic one at
> a
> time, alternatively you could try remove each parameter one at a time
> until
> you don't get the error.
>
> John|||Hi
"Bad variable type" is definitely generated by Delphi!
I googled this!
http://tinyurl.com/9h39b
This seems to imply you need to be very careful when choosing the datatypes
so you may not want to leave the application to do this automatically.
http://tinyurl.com/aguh8
John
"JeremyGrand" wrote:

> John, brilliant idea. I've created a dummy program and a dummy stored pro
c
> and am experimenting. I can actually make a program where the stored proc
> succeeds by dropping a sp component on a form, whereas creating it in code
> fails on w2k boxes. I guess you've gotta say that's progress!
> The evidence also seems to be supporting the notion that the problem is in
> delphi. There was an issue with D7.1 last year, and I'm pursuing this at
> the moment.
> Thanks.
> Jeremy
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:3FD30FD2-D288-46AD-94AB-1AF6B9ECEBCB@.microsoft.com...
>
>|||John, good catch, these are hits I didn't find. I eventually followed the
trail to Borland's Quality Central, where it claims to be resolved, but
maybe not in Delphi 7, which is what I'm using.
However, fwiw, the solution for me seems to be to ask Delphi to enumerate
the sp's parameters (tadodataset.parameters.refresh, if you care to know),
and then I assign values in code. The app now works on w2k. Previously I
was creating the parameter objects and setting properties, and no variation
could be made to work.
Thanks for your help!
Jeremy
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:43541BEF-DFEE-4A07-9C98-90EFE2259D89@.microsoft.com...
> Hi
> "Bad variable type" is definitely generated by Delphi!
> I googled this!
> http://tinyurl.com/9h39b
> This seems to imply you need to be very careful when choosing the
> datatypes
> so you may not want to leave the application to do this automatically.
> http://tinyurl.com/aguh8
> John
>
>
> "JeremyGrand" wrote:
>

Friday, January 27, 2012

please help System.Data.SqlClient.SqlClientPermission problem

im getting this error when i try to access the application from the network. but in my computer work fine

Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

please help... thanxs

When the asp.net application is deployed onto the webserver the asp.net worker process may be using the context of an account that does not have permissions to the database.

Please check the directory security tab for your website/virtual directory in IIS.

|||

the security tab if the iis is the for anonimous access...

|||

royrfc:

the security tab if the iis is the for anonimous access...

You need to make sure the account specified for anonymous access has permissions to access your database

|||

already add IUSR_ and ASPNET user to the database and nothing.

the application is an windows control library created by me in vs2005 , added to the aspx page

|||

royrfc:

the application is an windows control library created by me in vs2005 , added to the aspx page

So it is the .NET applet trying to access the database. You may need to give it the permissions by using CAS or declaratively I think.

I am not that knowledgable in this area so have a read of these articles, they may help

http://support.microsoft.com/kb/315529

http://msdn2.microsoft.com/en-us/library/Aa302424.aspx

|||

need help with that...

try some forums explaining CAS, but no luck at all

need help