Showing posts with label created. Show all posts
Showing posts with label created. Show all posts

Thursday, March 29, 2012

Field not sorting in ascending order

Hi, I've created a website usiing asp.net and all the data are stored in sql front. All the item are sorted in ascending order except one record. The correct order should be MP61, MP100, MP200, but this record is retrieved as MP100, MP200, MP61. If the coding is wrong, all the order displayed is not in ascending order. We have hundreds of items, but why it happens to this particular record? Can anyone help? Thanks in advance

That's because your field is not numeric, if it were numeric, you would expect 61,100,200

but, with text, it looks at MP with a '1' and sees it first, then, MP with a '2' and sees it next - - naturally 6 is after 2 - - but that's the reason.

|||

It is possible to get text to behave a bit like numbers.

If you had stored this instead, it would sort correctly:

MP061, MP100, MP200

This example presumes that the numerical component will always be no more than 3 characters and all 3 postiions are identified for each record (even if they are zero). In general, it's better not to try to sort alpha-numeric data in a numerical sort order.

|||If all of your records have a 2-character prefix in that column, andthere are only numeric characters that follow, you can use thisapproach to solve your sorting problem:
SELECT
someColumns
FROM
someTable
ORDER BY
CAST(SUBSTRING(mpColumn,3,99) AS integer),
mpColumn

field level security question

I have a simple interface created with access2002 that just uses an ODBC
connection to 2 tables that reside on a SQL2000 server. I need to give this
utility to persons that should not see a couple particular fields of the
tables. (obviously the utility was not designed for their use.. this is a
recent change in requirement) I see the option to limit permissions right
down to the field level on sql2000 server. If I get rid of all permissions
to just a few fields (not key fields required for joins anywhere in the
utility) for these particular users will the utility still work? I have
launched the utility before adding a user account, by mistake, prior and the
utility opens except their is just no data. For example, a form is based on
a table, the user does not have an account that allows access to this table,
and the form opens but just shows no data. I am hoping if I deny access to
just a few fields that the form would open and only those fields would be
blank. But the rest of the data would be there. Is this the case? Would it
also be the same in the case of forms that display info based on a JOIN of
the 2 tables? (not denying access to primary/foreign key fields that the
join requires)
I want to make sure I'm doing an 'ok' thing before I do this. For example,
even if I don't get errors what else may go wrong that I'm not seeing?
Thanks in advance for any help.If you deny/revoke permissions on a specific column, then the calling
application will receive an error, when it tries to access that column. So
no, the forms application will fail.
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"djc" <noone@.nowhere.com> wrote in message
news:OnT1Gkf2DHA.2160@.TK2MSFTNGP12.phx.gbl...
I have a simple interface created with access2002 that just uses an ODBC
connection to 2 tables that reside on a SQL2000 server. I need to give this
utility to persons that should not see a couple particular fields of the
tables. (obviously the utility was not designed for their use.. this is a
recent change in requirement) I see the option to limit permissions right
down to the field level on sql2000 server. If I get rid of all permissions
to just a few fields (not key fields required for joins anywhere in the
utility) for these particular users will the utility still work? I have
launched the utility before adding a user account, by mistake, prior and the
utility opens except their is just no data. For example, a form is based on
a table, the user does not have an account that allows access to this table,
and the form opens but just shows no data. I am hoping if I deny access to
just a few fields that the form would open and only those fields would be
blank. But the rest of the data would be there. Is this the case? Would it
also be the same in the case of forms that display info based on a JOIN of
the 2 tables? (not denying access to primary/foreign key fields that the
join requires)
I want to make sure I'm doing an 'ok' thing before I do this. For example,
even if I don't get errors what else may go wrong that I'm not seeing?
Thanks in advance for any help.|||Thanks for the quick response! So then based on this I assume there is
different behavior based on whether you are opening a form based on a table
that you have no permission on entirely or you are opening a form based on a
table that you are restricted from a few fields but have access to other
fields. Just want to make sure I understand if this is a distinction because
I have opened a form based on a table that the user has no permission on and
I did not receive any errors, just no data. More specifically, it was a
listBox control that gets data from a query of the sql server table. The
list box just remained empty. no error.
thanks again.
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
news:uR54Dqf2DHA.556@.TK2MSFTNGP11.phx.gbl...
quote:

> If you deny/revoke permissions on a specific column, then the calling
> application will receive an error, when it tries to access that column. So
> no, the forms application will fail.
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
> Is .NET important for a database professional?
> http://vyaskn.tripod.com/poll.htm
>
> "djc" <noone@.nowhere.com> wrote in message
> news:OnT1Gkf2DHA.2160@.TK2MSFTNGP12.phx.gbl...
> I have a simple interface created with access2002 that just uses an ODBC
> connection to 2 tables that reside on a SQL2000 server. I need to give

this
quote:

> utility to persons that should not see a couple particular fields of the
> tables. (obviously the utility was not designed for their use.. this is a
> recent change in requirement) I see the option to limit permissions right
> down to the field level on sql2000 server. If I get rid of all permissions
> to just a few fields (not key fields required for joins anywhere in the
> utility) for these particular users will the utility still work? I have
> launched the utility before adding a user account, by mistake, prior and

the
quote:

> utility opens except their is just no data. For example, a form is based

on
quote:

> a table, the user does not have an account that allows access to this

table,
quote:

> and the form opens but just shows no data. I am hoping if I deny access to
> just a few fields that the form would open and only those fields would be
> blank. But the rest of the data would be there. Is this the case? Would it
> also be the same in the case of forms that display info based on a JOIN of
> the 2 tables? (not denying access to primary/foreign key fields that the
> join requires)
> I want to make sure I'm doing an 'ok' thing before I do this. For example,
> even if I don't get errors what else may go wrong that I'm not seeing?
> Thanks in advance for any help.
>
>
|||In both the cases, you get an error. How the application behaves depends on,
how it is trapping each error. The application could be handling the error,
and displaying no data.
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"djc" <noone@.nowhere.com> wrote in message
news:u3HU80f2DHA.1752@.tk2msftngp13.phx.gbl...
Thanks for the quick response! So then based on this I assume there is
different behavior based on whether you are opening a form based on a table
that you have no permission on entirely or you are opening a form based on a
table that you are restricted from a few fields but have access to other
fields. Just want to make sure I understand if this is a distinction because
I have opened a form based on a table that the user has no permission on and
I did not receive any errors, just no data. More specifically, it was a
listBox control that gets data from a query of the sql server table. The
list box just remained empty. no error.
thanks again.
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
news:uR54Dqf2DHA.556@.TK2MSFTNGP11.phx.gbl...
quote:

> If you deny/revoke permissions on a specific column, then the calling
> application will receive an error, when it tries to access that column. So
> no, the forms application will fail.
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
> Is .NET important for a database professional?
> http://vyaskn.tripod.com/poll.htm
>
> "djc" <noone@.nowhere.com> wrote in message
> news:OnT1Gkf2DHA.2160@.TK2MSFTNGP12.phx.gbl...
> I have a simple interface created with access2002 that just uses an ODBC
> connection to 2 tables that reside on a SQL2000 server. I need to give

this
quote:

> utility to persons that should not see a couple particular fields of the
> tables. (obviously the utility was not designed for their use.. this is a
> recent change in requirement) I see the option to limit permissions right
> down to the field level on sql2000 server. If I get rid of all permissions
> to just a few fields (not key fields required for joins anywhere in the
> utility) for these particular users will the utility still work? I have
> launched the utility before adding a user account, by mistake, prior and

the
quote:

> utility opens except their is just no data. For example, a form is based

on
quote:

> a table, the user does not have an account that allows access to this

table,
quote:

> and the form opens but just shows no data. I am hoping if I deny access to
> just a few fields that the form would open and only those fields would be
> blank. But the rest of the data would be there. Is this the case? Would it
> also be the same in the case of forms that display info based on a JOIN of
> the 2 tables? (not denying access to primary/foreign key fields that the
> join requires)
> I want to make sure I'm doing an 'ok' thing before I do this. For example,
> even if I don't get errors what else may go wrong that I'm not seeing?
> Thanks in advance for any help.
>
>
|||ok. Thanks.
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
news:e9E0y3f2DHA.1720@.TK2MSFTNGP10.phx.gbl...
quote:

> In both the cases, you get an error. How the application behaves depends

on,
quote:

> how it is trapping each error. The application could be handling the

error,
quote:

> and displaying no data.
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
> Is .NET important for a database professional?
> http://vyaskn.tripod.com/poll.htm
>
> "djc" <noone@.nowhere.com> wrote in message
> news:u3HU80f2DHA.1752@.tk2msftngp13.phx.gbl...
> Thanks for the quick response! So then based on this I assume there is
> different behavior based on whether you are opening a form based on a

table
quote:

> that you have no permission on entirely or you are opening a form based on

a
quote:

> table that you are restricted from a few fields but have access to other
> fields. Just want to make sure I understand if this is a distinction

because
quote:

> I have opened a form based on a table that the user has no permission on

and
quote:

> I did not receive any errors, just no data. More specifically, it was a
> listBox control that gets data from a query of the sql server table. The
> list box just remained empty. no error.
> thanks again.
>
> "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
> news:uR54Dqf2DHA.556@.TK2MSFTNGP11.phx.gbl...
So[QUOTE]
> this
a[QUOTE]
right[QUOTE]
permissions[QUOTE]
> the
> on
> table,
to[QUOTE]
be[QUOTE]
it[QUOTE]
of[QUOTE]
example,[QUOTE]
>
>

Tuesday, March 27, 2012

Field cannot be summarized

I have created a formula field called "other" with the following:
if Count({BOR9798B.SSN},{bormatch9798984.NAICS}) < 6 then
{@.freq} else 0
When I create a formula field called "other2" with the following:
Sum ({@.Other}) I get the message 'This field cannot be summarized'. What can I do?What is the datatype of that field?

Monday, March 12, 2012

FAT Fingered my DB name with a space character...

This wa an oops on my part. I created a new DB las week and I fatfingered the space character in it so now it's called: "DUMMY_FATFINGER " (Notice the space)

Other than recreating it how can I rename it correctly? Just clicking on it to rename it does not work. I get the Database already exists error.

Thankssp_rename?|||I forgot to mention it is on a SQL 2005 Server. Is sp_rename SQL 2005? I recall, I think I recall, sp_renamedb was SQL 2K?

Thanks for the quick reply.|||sp_renamedb should still work. everyone has to be logged out first though.|||I get the following error...
Msg 15032, Level 16, State 1, Procedure sp_renamedb, Line 36
The database 'HR_TRACKING' already exists. Specify a unique database name.

Obviously SQL knows the correct name, users are connecting to the correct name that does not have the space at the end. The problem is, when the backup job runs, it is getting the name with the space at the end. When I run the sp_renameDB the system knows already it has the correct name hence the error message above. It's a cosmeting naming thing somewhere in SQL.

Thanks|||Damn I get here BEFORE I get the email

OR

You could dump the db and rename it

Why do you care BTW?|||What Backup Job?

And let me ask this silly question

does the other bd actually exist?|||I care becaus when the backups kick off to backup to a disk device to a file, the filename to backup to comes out to be 'DBNAME_FATFINGER _backup_200710120945.bak'. It can't handle the space in the name and the backup job errors out.

Thanks|||BINGO!!!!

Renaming it twice did the trick!

I actually used the GUI to do it.

Wednesday, March 7, 2012

Fast Printing from Crystal report 9.0

Hi,
We have created an application in VB 6, MS ACCESS 2000 and all the reports we created in CRYSTAL REPORT 9.0. Now our customer is complaining that printing speed is very slow. IS there any way to fasten the printing speed of Crystal report ?Instal Generic Printer and adjust the report accordingly. in this case you will not able to print graphics line etc. but printing is very very fast. The printer driver exists in windows. i have also applied this thing in my projects (with crystal 8.0).|||Originally posted by jimman
Hi,
We have created an application in VB 6, MS ACCESS 2000 and all the reports we created in CRYSTAL REPORT 9.0. Now our customer is complaining that printing speed is very slow. IS there any way to fasten the printing speed of Crystal report ?

Hi,

Use Printer support fonts, you can find out the printer icon contains in the front of the font name.|||HI,

I think the best way to achieve fast printing is to print in DOS format; for this u will have to export the report into text file and using Bat file print this report..

try and see..

swapnil

Sunday, February 19, 2012

Failure Sending Mail

Hello all,
I have a particular problem with subscriptions when the subscription is
created by a user who is not an administrator. The problem points to a
permissions issue but I've tried several ways to resolve this without any
luck.
If the subscription is run only selecting a link to the report the
subscription works fine. I've gave the user the same role based permissions
as myself within the report server and set them up with Read & Execute, List
Folder Content and Read access on the Reports and ReportServer within IIS and
the folders are set to use Integrated Windows authentication.
The user can run the report OK and export to any of teh available options
from the list. Any help with this would be much appreciated.
Regards
MikeOn Feb 8, 6:52 am, MikeD <M...@.discussions.microsoft.com> wrote:
> Hello all,
> I have a particular problem with subscriptions when the subscription is
> created by a user who is not an administrator. The problem points to a
> permissions issue but I've tried several ways to resolve this without any
> luck.
> If the subscription is run only selecting a link to the report the
> subscription works fine. I've gave the user the same role based permissions
> as myself within the report server and set them up with Read & Execute, List
> Folder Content and Read access on the Reports and ReportServer within IIS and
> the folders are set to use Integrated Windows authentication.
> The user can run the report OK and export to any of teh available options
> from the list. Any help with this would be much appreciated.
> Regards
> Mike
I had an application that would create a subscription, and what I
found was this:
To create a subscription programmatically the user you are using to
create the subscription must have Content Manager permissions. This
is a System level role that is available under Site Settings on the
Home page, as opposed to the standard roles on the folders.|||Thanks for the info. The user in question has Content Manager role set but
the subscription is not being set programatically, the user is creating the
subscription via the Report Manager web page. As mentioned it only fails when
an attachment is done, it works OK when only a link to th report is included.
"DMcM" wrote:
> On Feb 8, 6:52 am, MikeD <M...@.discussions.microsoft.com> wrote:
> > Hello all,
> >
> > I have a particular problem with subscriptions when the subscription is
> > created by a user who is not an administrator. The problem points to a
> > permissions issue but I've tried several ways to resolve this without any
> > luck.
> >
> > If the subscription is run only selecting a link to the report the
> > subscription works fine. I've gave the user the same role based permissions
> > as myself within the report server and set them up with Read & Execute, List
> > Folder Content and Read access on the Reports and ReportServer within IIS and
> > the folders are set to use Integrated Windows authentication.
> >
> > The user can run the report OK and export to any of teh available options
> > from the list. Any help with this would be much appreciated.
> >
> > Regards
> >
> > Mike
> I had an application that would create a subscription, and what I
> found was this:
> To create a subscription programmatically the user you are using to
> create the subscription must have Content Manager permissions. This
> is a System level role that is available under Site Settings on the
> Home page, as opposed to the standard roles on the folders.
>

failure on backup device

I have a created a backup device that maps to another server. When the job
runs that refences that backup device it is sucessful...for the first cupple
times that it is scheduled to run, but then it fails with the following
message
Event Type: Error
Event Source: MSSQLServer
Event Category: Kernel
Event ID: 17055
Date: 5/10/2004
Time: 7:03:57 PM
User: Domain\dbserv
Computer: SQLSRV
Description:
18210 :
BackupDiskFile::RequestDurableMedia: failure on backup device
'\\srv1\sql$\datastore\db105.BAK'. Operating system error 64(The specified
network name is no longer available.)
I have recreated the backup device and still get the same results.
Any help would be great!
Hi,
Ensure that you start the MSSQL Server and SQL Agent service using a Domain
account which got
previlages to \\srv1\sql$\datastore\ folder , share.
As well as this error might come if your network is very slow. Check the
network by issuing a ping <ipaddress> to the host machine.
If it gives request time out in between, then you have to contact your
network admin to rectify the issue.
Thanks
Hari
MCDBA
"jpfanc" <jpfanc_NOSPAM@.hotmail.com> wrote in message
news:eHj$F72NEHA.2708@.TK2MSFTNGP10.phx.gbl...
> I have a created a backup device that maps to another server. When the
job
> runs that refences that backup device it is sucessful...for the first
cupple
> times that it is scheduled to run, but then it fails with the following
> message
> Event Type: Error
> Event Source: MSSQLServer
> Event Category: Kernel
> Event ID: 17055
> Date: 5/10/2004
> Time: 7:03:57 PM
> User: Domain\dbserv
> Computer: SQLSRV
> Description:
> 18210 :
> BackupDiskFile::RequestDurableMedia: failure on backup device
> '\\srv1\sql$\datastore\db105.BAK'. Operating system error 64(The specified
> network name is no longer available.)
> I have recreated the backup device and still get the same results.
> Any help would be great!
>

failure on backup device

I have a created a backup device that maps to another server. When the job
runs that refences that backup device it is sucessful...for the first cupple
times that it is scheduled to run, but then it fails with the following
message
Event Type: Error
Event Source: MSSQLServer
Event Category: Kernel
Event ID: 17055
Date: 5/10/2004
Time: 7:03:57 PM
User: Domain\dbserv
Computer: SQLSRV
Description:
18210 :
BackupDiskFile::RequestDurableMedia: failure on backup device
'\\srv1\sql$\datastore\db105.BAK'. Operating system error 64(The specified
network name is no longer available.)
I have recreated the backup device and still get the same results.
Any help would be great!Hi,
Ensure that you start the MSSQL Server and SQL Agent service using a Domain
account which got
previlages to \\srv1\sql$\datastore\ folder , share.
As well as this error might come if your network is very slow. Check the
network by issuing a ping <ipaddress> to the host machine.
If it gives request time out in between, then you have to contact your
network admin to rectify the issue.
Thanks
Hari
MCDBA
"jpfanc" <jpfanc_NOSPAM@.hotmail.com> wrote in message
news:eHj$F72NEHA.2708@.TK2MSFTNGP10.phx.gbl...
> I have a created a backup device that maps to another server. When the
job
> runs that refences that backup device it is sucessful...for the first
cupple
> times that it is scheduled to run, but then it fails with the following
> message
> Event Type: Error
> Event Source: MSSQLServer
> Event Category: Kernel
> Event ID: 17055
> Date: 5/10/2004
> Time: 7:03:57 PM
> User: Domain\dbserv
> Computer: SQLSRV
> Description:
> 18210 :
> BackupDiskFile::RequestDurableMedia: failure on backup device
> '\\srv1\sql$\datastore\db105.BAK'. Operating system error 64(The specified
> network name is no longer available.)
> I have recreated the backup device and still get the same results.
> Any help would be great!
>

failure on backup device

I have a created a backup device that maps to another server. When the job
runs that refences that backup device it is sucessful...for the first cupple
times that it is scheduled to run, but then it fails with the following
message
Event Type: Error
Event Source: MSSQLServer
Event Category: Kernel
Event ID: 17055
Date: 5/10/2004
Time: 7:03:57 PM
User: Domain\dbserv
Computer: SQLSRV
Description:
18210 :
BackupDiskFile::RequestDurableMedia: failure on backup device
'\\srv1\sql$\datastore\db105.BAK'. Operating system error 64(The specified
network name is no longer available.)
I have recreated the backup device and still get the same results.
Any help would be great!Hi,
Ensure that you start the MSSQL Server and SQL Agent service using a Domain
account which got
previlages to \\srv1\sql$\datastore\ folder , share.
As well as this error might come if your network is very slow. Check the
network by issuing a ping <ipaddress> to the host machine.
If it gives request time out in between, then you have to contact your
network admin to rectify the issue.
Thanks
Hari
MCDBA
"jpfanc" <jpfanc_NOSPAM@.hotmail.com> wrote in message
news:eHj$F72NEHA.2708@.TK2MSFTNGP10.phx.gbl...
> I have a created a backup device that maps to another server. When the
job
> runs that refences that backup device it is sucessful...for the first
cupple
> times that it is scheduled to run, but then it fails with the following
> message
> Event Type: Error
> Event Source: MSSQLServer
> Event Category: Kernel
> Event ID: 17055
> Date: 5/10/2004
> Time: 7:03:57 PM
> User: Domain\dbserv
> Computer: SQLSRV
> Description:
> 18210 :
> BackupDiskFile::RequestDurableMedia: failure on backup device
> '\\srv1\sql$\datastore\db105.BAK'. Operating system error 64(The specified
> network name is no longer available.)
> I have recreated the backup device and still get the same results.
> Any help would be great!
>