Showing posts with label particular. Show all posts
Showing posts with label particular. Show all posts

Sunday, March 25, 2012

accessing datasets / Field collections through custom code

Hi,

My report has multiple datasets, and I want to access the fields of a particular dataset from custom code. The problem is that the name of the dataset to use is only calculated during the execution of the custom code.

Allow me to illustrate:

public function Test(data as DataSets, fieldName as string)

dim datasetName as string = CalculateDatasetName()
dim ds as Dataset = data(datasetName)

' now here I want to get the fieldName out of the dataset.
' in the report, I would do something like
' First(Fields!fieldName.Value, datasetName)
' but in custom code, this obviously doesn't work.

end function

I've been looking for a way to accomplish this, but it seems you cannot get data from a dataset through custom code (there is only the commandtext property). Also it is not possible to pass the Fields collection as a parameter, as I do not know the dataset name when in the report designer.

I hope my problem description is clear.
Does anyone know how to solve this issue?

Thanks,
Phil

Hi Phil,

Look at the code below

public DataSet Dataset_name = new DataSet();

public DataTable DataTable_name = new DataTable();

public DataColumn DataColumn_name = new DataColumn();

public DataView View_name = new DataView();

public datatype function(name_of _variable_which catch_the column_value datatype)

{

DataColumn_name = new DataColumn("name_of _variable_which catch_the column_value", System.Type.GetType("System.String"))

}

Hope this helps

Priyank

Monday, March 19, 2012

Access violation

Hi,
I'm having a problem with a particular address location.
I'm using MS SQL Server 2000
I checked the server logs and I see some stack dumps now and then.
I checked the stack dumps and all of them seem to have the same problem.
* BEGIN STACK DUMP:
* 06/14/05 23:18:37 spid 0
*
* Exception Address = 258B6EF6
* Exception Code = c0000005 EXCEPTION_ACCESS_VIOLATION
* Access Violation occurred reading address 77BEC370
All the stack dumps shows error reading the address 77BEC370
Is this because of a faulty memory?
DanielAccess violations are usually down to one of three things:
1) Faulty hardware
2) Buggy drivers
3) A bug in SQL Server
You would be best advised to call Microsoft Support to discover the
cause, if it's a bug in SQL Server you will get your support call refunded.
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Daniel Chen wrote:
> Hi,
> I'm having a problem with a particular address location.
> I'm using MS SQL Server 2000
> I checked the server logs and I see some stack dumps now and then.
> I checked the stack dumps and all of them seem to have the same problem.
> * BEGIN STACK DUMP:
> * 06/14/05 23:18:37 spid 0
> *
> * Exception Address = 258B6EF6
> * Exception Code = c0000005 EXCEPTION_ACCESS_VIOLATION
> * Access Violation occurred reading address 77BEC370
> All the stack dumps shows error reading the address 77BEC370
> Is this because of a faulty memory?
> Daniel
>|||so it has nothing to do with buggy programming? As i am using the db with
ASP.
Thanks,
Daniel
"Mark Allison" <mark@.no.tinned.meat.mvps.org> wrote in message
news:OrotFVYcFHA.1392@.TK2MSFTNGP14.phx.gbl...
> Access violations are usually down to one of three things:
> 1) Faulty hardware
> 2) Buggy drivers
> 3) A bug in SQL Server
> You would be best advised to call Microsoft Support to discover the cause,
> if it's a bug in SQL Server you will get your support call refunded.
> --
> Mark Allison, SQL Server MVP
> http://www.markallison.co.uk
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602m.html
>
> Daniel Chen wrote:
>> Hi,
>> I'm having a problem with a particular address location.
>> I'm using MS SQL Server 2000
>> I checked the server logs and I see some stack dumps now and then.
>> I checked the stack dumps and all of them seem to have the same problem.
>> * BEGIN STACK DUMP:
>> * 06/14/05 23:18:37 spid 0
>> *
>> * Exception Address = 258B6EF6
>> * Exception Code = c0000005 EXCEPTION_ACCESS_VIOLATION
>> * Access Violation occurred reading address 77BEC370
>> All the stack dumps shows error reading the address 77BEC370
>> Is this because of a faulty memory?
>> Daniel|||"Daniel Chen" <lifehalo@.yahoo.com.sg> wrote in message
news:d8orha$tli$1@.nobel.pacific.net.sg...
> so it has nothing to do with buggy programming? As i am using the db with
> ASP.
> Thanks,
> Daniel
Yes ;)
This is internal SQL Server error, the causes Mark Allsion give in previous
post|||*This time* it's not your buggy programming, but could be your buggy
drivers or faulty hardware, or MS's buggy programming. ;-)
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Daniel Chen wrote:
> so it has nothing to do with buggy programming? As i am using the db with
> ASP.
> Thanks,
> Daniel
>|||alright. thanks for your help. :)
"Mark Allison" <mark@.no.tinned.meat.mvps.org> wrote in message
news:ua59M$YcFHA.2840@.TK2MSFTNGP14.phx.gbl...
> *This time* it's not your buggy programming, but could be your buggy
> drivers or faulty hardware, or MS's buggy programming. ;-)
> --
> Mark Allison, SQL Server MVP
> http://www.markallison.co.uk
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602m.html
>
> Daniel Chen wrote:
>> so it has nothing to do with buggy programming? As i am using the db with
>> ASP.
>> Thanks,
>> Daniel|||I recently had an issue similiar to this where the developers introduced a
READPAST hint into several code bases. I was getting this access violation
and Support recommended a patch (which I couldn't do because I had 36
clusters and couldn't afford to have something different on a few) or put a
clustered index instead of a non-clustered index on the table where the
READPAST hint was being used. That worked like a charm. Don't know if
that's your issue, but thought I'd mention it.
"Daniel Chen" wrote:
> Hi,
> I'm having a problem with a particular address location.
> I'm using MS SQL Server 2000
> I checked the server logs and I see some stack dumps now and then.
> I checked the stack dumps and all of them seem to have the same problem.
> * BEGIN STACK DUMP:
> * 06/14/05 23:18:37 spid 0
> *
> * Exception Address = 258B6EF6
> * Exception Code = c0000005 EXCEPTION_ACCESS_VIOLATION
> * Access Violation occurred reading address 77BEC370
> All the stack dumps shows error reading the address 77BEC370
> Is this because of a faulty memory?
> Daniel
>
>

Access violation

Hi,
I'm having a problem with a particular address location.
I'm using MS SQL Server 2000
I checked the server logs and I see some stack dumps now and then.
I checked the stack dumps and all of them seem to have the same problem.
* BEGIN STACK DUMP:
* 06/14/05 23:18:37 spid 0
*
* Exception Address = 258B6EF6
* Exception Code = c0000005 EXCEPTION_ACCESS_VIOLATION
* Access Violation occurred reading address 77BEC370
All the stack dumps shows error reading the address 77BEC370
Is this because of a faulty memory?
Daniel
Access violations are usually down to one of three things:
1) Faulty hardware
2) Buggy drivers
3) A bug in SQL Server
You would be best advised to call Microsoft Support to discover the
cause, if it's a bug in SQL Server you will get your support call refunded.
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Daniel Chen wrote:
> Hi,
> I'm having a problem with a particular address location.
> I'm using MS SQL Server 2000
> I checked the server logs and I see some stack dumps now and then.
> I checked the stack dumps and all of them seem to have the same problem.
> * BEGIN STACK DUMP:
> * 06/14/05 23:18:37 spid 0
> *
> * Exception Address = 258B6EF6
> * Exception Code = c0000005 EXCEPTION_ACCESS_VIOLATION
> * Access Violation occurred reading address 77BEC370
> All the stack dumps shows error reading the address 77BEC370
> Is this because of a faulty memory?
> Daniel
>
|||so it has nothing to do with buggy programming? As i am using the db with
ASP.
Thanks,
Daniel
"Mark Allison" <mark@.no.tinned.meat.mvps.org> wrote in message
news:OrotFVYcFHA.1392@.TK2MSFTNGP14.phx.gbl...[vbcol=seagreen]
> Access violations are usually down to one of three things:
> 1) Faulty hardware
> 2) Buggy drivers
> 3) A bug in SQL Server
> You would be best advised to call Microsoft Support to discover the cause,
> if it's a bug in SQL Server you will get your support call refunded.
> --
> Mark Allison, SQL Server MVP
> http://www.markallison.co.uk
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602m.html
>
> Daniel Chen wrote:
|||"Daniel Chen" <lifehalo@.yahoo.com.sg> wrote in message
news:d8orha$tli$1@.nobel.pacific.net.sg...
> so it has nothing to do with buggy programming? As i am using the db with
> ASP.
> Thanks,
> Daniel
Yes ;)
This is internal SQL Server error, the causes Mark Allsion give in previous
post
|||*This time* it's not your buggy programming, but could be your buggy
drivers or faulty hardware, or MS's buggy programming. ;-)
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Daniel Chen wrote:
> so it has nothing to do with buggy programming? As i am using the db with
> ASP.
> Thanks,
> Daniel
>
|||alright. thanks for your help.
"Mark Allison" <mark@.no.tinned.meat.mvps.org> wrote in message
news:ua59M$YcFHA.2840@.TK2MSFTNGP14.phx.gbl...[vbcol=seagreen]
> *This time* it's not your buggy programming, but could be your buggy
> drivers or faulty hardware, or MS's buggy programming. ;-)
> --
> Mark Allison, SQL Server MVP
> http://www.markallison.co.uk
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602m.html
>
> Daniel Chen wrote:
|||I recently had an issue similiar to this where the developers introduced a
READPAST hint into several code bases. I was getting this access violation
and Support recommended a patch (which I couldn't do because I had 36
clusters and couldn't afford to have something different on a few) or put a
clustered index instead of a non-clustered index on the table where the
READPAST hint was being used. That worked like a charm. Don't know if
that's your issue, but thought I'd mention it.
"Daniel Chen" wrote:

> Hi,
> I'm having a problem with a particular address location.
> I'm using MS SQL Server 2000
> I checked the server logs and I see some stack dumps now and then.
> I checked the stack dumps and all of them seem to have the same problem.
> * BEGIN STACK DUMP:
> * 06/14/05 23:18:37 spid 0
> *
> * Exception Address = 258B6EF6
> * Exception Code = c0000005 EXCEPTION_ACCESS_VIOLATION
> * Access Violation occurred reading address 77BEC370
> All the stack dumps shows error reading the address 77BEC370
> Is this because of a faulty memory?
> Daniel
>
>

Access violation

Hi,
I'm having a problem with a particular address location.
I'm using MS SQL Server 2000
I checked the server logs and I see some stack dumps now and then.
I checked the stack dumps and all of them seem to have the same problem.
* BEGIN STACK DUMP:
* 06/14/05 23:18:37 spid 0
*
* Exception Address = 258B6EF6
* Exception Code = c0000005 EXCEPTION_ACCESS_VIOLATION
* Access Violation occurred reading address 77BEC370
All the stack dumps shows error reading the address 77BEC370
Is this because of a faulty memory?
DanielAccess violations are usually down to one of three things:
1) Faulty hardware
2) Buggy drivers
3) A bug in SQL Server
You would be best advised to call Microsoft Support to discover the
cause, if it's a bug in SQL Server you will get your support call refunded.
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Daniel Chen wrote:
> Hi,
> I'm having a problem with a particular address location.
> I'm using MS SQL Server 2000
> I checked the server logs and I see some stack dumps now and then.
> I checked the stack dumps and all of them seem to have the same problem.
> * BEGIN STACK DUMP:
> * 06/14/05 23:18:37 spid 0
> *
> * Exception Address = 258B6EF6
> * Exception Code = c0000005 EXCEPTION_ACCESS_VIOLATION
> * Access Violation occurred reading address 77BEC370
> All the stack dumps shows error reading the address 77BEC370
> Is this because of a faulty memory?
> Daniel
>|||so it has nothing to do with buggy programming? As i am using the db with
ASP.
Thanks,
Daniel
"Mark Allison" <mark@.no.tinned.meat.mvps.org> wrote in message
news:OrotFVYcFHA.1392@.TK2MSFTNGP14.phx.gbl...[vbcol=seagreen]
> Access violations are usually down to one of three things:
> 1) Faulty hardware
> 2) Buggy drivers
> 3) A bug in SQL Server
> You would be best advised to call Microsoft Support to discover the cause,
> if it's a bug in SQL Server you will get your support call refunded.
> --
> Mark Allison, SQL Server MVP
> http://www.markallison.co.uk
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602m.html
>
> Daniel Chen wrote:|||"Daniel Chen" <lifehalo@.yahoo.com.sg> wrote in message
news:d8orha$tli$1@.nobel.pacific.net.sg...
> so it has nothing to do with buggy programming? As i am using the db with
> ASP.
> Thanks,
> Daniel
Yes ;)
This is internal SQL Server error, the causes Mark Allsion give in previous
post|||*This time* it's not your buggy programming, but could be your buggy
drivers or faulty hardware, or MS's buggy programming. ;-)
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Daniel Chen wrote:
> so it has nothing to do with buggy programming? As i am using the db with
> ASP.
> Thanks,
> Daniel
>|||alright. thanks for your help.
"Mark Allison" <mark@.no.tinned.meat.mvps.org> wrote in message
news:ua59M$YcFHA.2840@.TK2MSFTNGP14.phx.gbl...[vbcol=seagreen]
> *This time* it's not your buggy programming, but could be your buggy
> drivers or faulty hardware, or MS's buggy programming. ;-)
> --
> Mark Allison, SQL Server MVP
> http://www.markallison.co.uk
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602m.html
>
> Daniel Chen wrote:|||I recently had an issue similiar to this where the developers introduced a
READPAST hint into several code bases. I was getting this access violation
and Support recommended a patch (which I couldn't do because I had 36
clusters and couldn't afford to have something different on a few) or put a
clustered index instead of a non-clustered index on the table where the
READPAST hint was being used. That worked like a charm. Don't know if
that's your issue, but thought I'd mention it.
"Daniel Chen" wrote:

> Hi,
> I'm having a problem with a particular address location.
> I'm using MS SQL Server 2000
> I checked the server logs and I see some stack dumps now and then.
> I checked the stack dumps and all of them seem to have the same problem.
> * BEGIN STACK DUMP:
> * 06/14/05 23:18:37 spid 0
> *
> * Exception Address = 258B6EF6
> * Exception Code = c0000005 EXCEPTION_ACCESS_VIOLATION
> * Access Violation occurred reading address 77BEC370
> All the stack dumps shows error reading the address 77BEC370
> Is this because of a faulty memory?
> Daniel
>
>

Monday, February 13, 2012

Access help.

I am a beginning programmar using Access. I need help defining creating a query that shows the number of items from a particular field as there are many of the same items. As well as create seperate listings for each item as they are also located under different location keys. Can anyone help???

This question sounds pretty basic and I feel really dumb for asking.Look at the following 2 functions: count(*) and group by

col has values 1,3,6,1,2,1,1,3

e.g. - select col, count(*) from table group by col

would return:

col count(*)
1 4
2 1
3 2
6 1|||does the same rule apply when you are trying to sort 2 columns by count.

ex.

col 1 - High School 1, high school 2 high school 3
col 2- IIe, IIe, iMac, II, HP HP, IIe, IIe, iMac, II, HP HP
col 3 - count

I am trying to create a count list for: high school 1, 2 and 3.

Jeremy

Originally posted by rnealejr
Look at the following 2 functions: count(*) and group by

col has values 1,3,6,1,2,1,1,3

e.g. - select col, count(*) from table group by col

would return:

col count(*)
1 4
2 1
3 2
6 1

Thursday, February 9, 2012

access denied EXEC error after mapping group

If I add a Login, which is a Windows group of which a user belongs, then map
that group to a particular database, with roles public, db_datareader,
db_datawriter, shouldn't that person be able to EXEC a stored proc from the
database?
They are not able to, and are getting an access denied error. What am I
doing wrong?
Tim Zych
SF, CA
Read and write permissions are not enough. You need to give execute
permissions to the user.
You can give execute permissions on a specific stored procedure like in
grant execute on proc to user
or you can give global execute permissions on the database (only SQL Server
2005) like in
grant execute on database::adventureworks to user
Hope this helps,
Ben Nevarez
Senior Database Administrator
AIG SunAmerica
"Tim Zych" wrote:

> If I add a Login, which is a Windows group of which a user belongs, then map
> that group to a particular database, with roles public, db_datareader,
> db_datawriter, shouldn't that person be able to EXEC a stored proc from the
> database?
> They are not able to, and are getting an access denied error. What am I
> doing wrong?
>
> --
> Tim Zych
> SF, CA
>
>
|||Thank you Ben. I'm glad to hear SQL 2005 allows database-wide EXEC
permissions. That's what we're using.
Tim Zych
SF, CA
"Ben Nevarez" <BenNevarez@.discussions.microsoft.com> wrote in message
news:AAB5FB06-7824-46CC-920C-125172CC81D0@.microsoft.com...[vbcol=seagreen]
> Read and write permissions are not enough. You need to give execute
> permissions to the user.
> You can give execute permissions on a specific stored procedure like in
> grant execute on proc to user
> or you can give global execute permissions on the database (only SQL
> Server
> 2005) like in
> grant execute on database::adventureworks to user
> Hope this helps,
> Ben Nevarez
> Senior Database Administrator
> AIG SunAmerica
>
> "Tim Zych" wrote:

access denied EXEC error after mapping group

If I add a Login, which is a Windows group of which a user belongs, then map
that group to a particular database, with roles public, db_datareader,
db_datawriter, shouldn't that person be able to EXEC a stored proc from the
database?
They are not able to, and are getting an access denied error. What am I
doing wrong?
Tim Zych
SF, CARead and write permissions are not enough. You need to give execute
permissions to the user.
You can give execute permissions on a specific stored procedure like in
grant execute on proc to user
or you can give global execute permissions on the database (only SQL Server
2005) like in
grant execute on database::adventureworks to user
Hope this helps,
Ben Nevarez
Senior Database Administrator
AIG SunAmerica
"Tim Zych" wrote:

> If I add a Login, which is a Windows group of which a user belongs, then m
ap
> that group to a particular database, with roles public, db_datareader,
> db_datawriter, shouldn't that person be able to EXEC a stored proc from th
e
> database?
> They are not able to, and are getting an access denied error. What am I
> doing wrong?
>
> --
> Tim Zych
> SF, CA
>
>|||Thank you Ben. I'm glad to hear SQL 2005 allows database-wide EXEC
permissions. That's what we're using.
Tim Zych
SF, CA
"Ben Nevarez" <BenNevarez@.discussions.microsoft.com> wrote in message
news:AAB5FB06-7824-46CC-920C-125172CC81D0@.microsoft.com...[vbcol=seagreen]
> Read and write permissions are not enough. You need to give execute
> permissions to the user.
> You can give execute permissions on a specific stored procedure like in
> grant execute on proc to user
> or you can give global execute permissions on the database (only SQL
> Server
> 2005) like in
> grant execute on database::adventureworks to user
> Hope this helps,
> Ben Nevarez
> Senior Database Administrator
> AIG SunAmerica
>
> "Tim Zych" wrote:
>