|
Providing users with keys is often unnecessary and can be hidden from them. Also, access to cryptographic keys can expose the data. It is best to only give a user only as much as required to perform the specific task in an effort limit overall system liability.
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|
|
Hi,
Is there any function in SQL server 2005 which takes the date/time and time zone as the parameters and returns whether the given date/time follows the daylight savings or not.
I was looking to a function in SQL Server very similar to the WIN API GetTimeZoneInformation().
So the input: date/time, time zone
Output: true/false (follows daylight savings/does not follow)
Pls let me know.
Thanks.
|
|
|
|
|
B"H
I have an application that needs to add fields to a table based on runtime values.
On the other hand the data set has 3 other tables that would greatly benifit from strong typed design time schema.
I would like to be able to save and load the data to/from XML. Hopefuly in the same file.
the problem is that when I load a file that was generated from a modified DataSet into a strongly typed data set, the additional fields are not loaded.
Thank you.
Rabbi Moshe Plotkin
SUNY New Paltz
Chabad & Dept. Computer Science
|
|
|
|
|
I am trying to install VS MSDE however when I click on setup.exe it tells me "A strong SA pasword is required for security reason. Please use SAPWD switch to supply same....."
However must articale that I read provide a command prompt option to change the SA password using osql. However when I try to run that command I recieve and error message stating that "OSQL is not a recognized internal or exteranl command...." My question are: I can not recall installing or configure SA account on my system, hence I am not sure how to access the database to update the A account. 2nd - How can I configure my PC to Osql. I have added it as a path on my PC but to no avail. Any other suggestion will be greatly appreciated.
Greg
Coding makes the world go round!!!
|
|
|
|
|
I think it is telling you that you need to run setup.exe with a command line switch and provide the password using the switch. If you haven't installed msde yet, then osql isn't installed either.
|
|
|
|
|
I have not yet install MSDE. However I try to input the new password through the setup.ini option but to no avail. I am not sure what else I can do to install MSDE.exe since it is not allowing me to do so neither through windows not command prompt.
Greg
Coding makes the world go round!!!
|
|
|
|
|
Are you sure the install has failed? MSDE gives no indication of success or failure, but would fail (with a false complaint about the sa password) on subsequent attempts to install. Have you rebooted and checked system services or the system tray to see if it is running?
|
|
|
|
|
I do see sqlserver.exe and write.exe in the process but I can not understand if this is in there why can't I OSQL?
Greg
Coding makes the world go round!!!
|
|
|
|
|
Hello,
I build a test report using SQL Server Business Intelligence
Development Studio. Every thing went well also I can preview of the
report. But when I wanted to deply it by right clicking it its throwing
a message
The first message I got was
'The project cannot be deployed because no target server is specified.
Provide a value for the TargetServerURL property in the property pages
for this project.'
To over the above problem I created a URL,
http://localhost/ReportServer in the property page .
And again I tried deploying it and second I got this message :
'A connection could not be made to the report server
http://localhost/ReportServer
Additional Information:
The attempt to connect to the report failed. Check your connection
information and that the report server is a compatible version.
(Microsoft.ReportingServices.Designer)'
This is first time I am trying to get the reports. Could some one
please help me how do proceed from here?
Thanks
-L
|
|
|
|
|
I tried this on XP PRo SQL Server 2005 Developer and this worked fine.
If you using SQL Server Express then this is not supplied with a Reporting Server Install and thus it won't upload into your local enviroments.
If you are using SQL server developer edition 2005 then you have to install the Reproting Server on your local box or a networked server.
To check if you have Reporting services installed go to http://localhost/Reports and your get up the web management tool.
Look where you want to go not where you don't want to crash.
Bikers Bible
|
|
|
|
|
I'm literally trying to clone data rows, nothing very complicated, infact, they aren't even going to be changed during this section of the project.
I've captured the rows I want to clone using a custom SQL query, but I'm not sure how to insert them back into the database with new ID's(primary key is autonumber)...
can't I just run a .update of some sort?
I've tried copying the data table from results of my query and merging into the complete table, that doesn't make any change.
I dont seem to be able to .insert anything other then independant values for each column.
I'm using VS 2005 and C#.
Thanks.
-- modified at 17:09 Monday 24th July, 2006
|
|
|
|
|
Just run an insert ignoring the autonumber primary key. It will be filled in for you.
INSERT INTO MyTable
(
Field1,
Field2,
Field3
)
SELECT
Field1,
Field2,
Field3
FROM
MyTable
WHERE
Field2 = 'MyCriteria'
|
|
|
|
|
I'm trying that, and I dont think I'm doing something right in the query.
Is field1 supposed to be the primary key?(as per default)?
I'm getting "primary key doesn't allow nulls" error, and my field1 is set to the autonum.
By autonum, I mean that SQL is set for INT for primary key, and I've got my dataset flagged to incriment 1, seed 1.
I think this is the correct way to set for autonum? I'm used to there being a default "autonum" from access for the field type...
-- modified at 18:26 Monday 24th July, 2006
|
|
|
|
|
try.....
insert into Employees
SELECT * from Employees where name = 'Joe'
Watch out for Unquie fields and indentity.
Look where you want to go not where you don't want to crash.
Bikers Bible
|
|
|
|
|
Do not specify the primary key. A new one will be generated for you.
Note: If you expect to get a full clone (copy the primary key also) then you will never accomplish this in a single table. Primary keys can not be duplicated.
|
|
|
|
|
If I use
INSERT INTO tbABC
SELECT (all but primary key)
FROM tbABC
WHERE Name = @Name
I get an error back saying that the Column Name or number of supplied values does not match the table definition.
If I use
INSERT INTO tbABC
SELECT *
FROM tbABC
WHERE Name = @Name
I get a name saying that the primary key can't be duplicated (duh)... I've been looking all over the table design and properties in SQL and I can't find where I can actually pick an autonumber for the field type.
I thought that inside my dataset I'd set to AutoIncriment, seed 1, step 1..
isn't this correctly setting autonumbering for an SQL database? I'm used to access just having autonum as a field type choice.
Thanks.
|
|
|
|
|
Sweet! I just found out I can flag the primary key as the identity column, now it works!!! Yay!
Thanks alot for your help guys.
-- modified at 15:04 Tuesday 25th July, 2006
|
|
|
|
|
Hi All,
I'm not sure if this should go here, or in the ASP.Net forum, so I'll try here and if someone wants to move it later, that's fine by me
I'm developing a web application using ASP.Net 2.0, which will be back-ended by a SQL Server 2005 database (Express for the moment, but once it prooves to be succesful, I think the bean counters will stump up for enterprise ).
The application is multi-user, so it must provide security for each user's data in that one user should not be able to view another user's data unless given permission to do so. To this end, I've decided that I need to implement row based security for each record. The plan is that each user is assigned to a role using the ASP.Net 2.0 security / login features, and each role is unique to each customer who uses the system. For example, take Mike - he works for CompanyA; in my application CompanyA is defined as a Role, and Mike is assigned to this Role. Now each and every record Mike enters is identified with the RoleID of CompanyA, and so Mike can only enter records for CompanyA and can only view records for CompanyA.
This seems like a pretty good way of acheiving this, but as always it's one of my home-brew plans, so I wondered if anyone had any experience of this kind of thing they could share, or can point out any pitfalls in my plans.
Thanks,
Martin.
|
|
|
|
|
SQL Server does not support row based authorisation as you describe. The business logic in the applications will have to ensure that Mike can only create or update the rows he is permitted to.
|
|
|
|
|
Don't you mean "Role Based Security" each user is assigned a role or trust level within the application that can if required use different database access levels as well.
You also have to consider how users with authenicate ( Windwos , Forms or both ?) and get a user id you can assign a Role or Memebership to. This can get fairly complex for mixed authenicated systems.
You could as a user is authenicated assign various Session State variable or better still a serialisable user object that can travel round with the user on each page. This will state user, customername or scope and access or trust level within the application.
Start simply and build from there.
Look where you want to go not where you don't want to crash.
Bikers Bible
|
|
|
|
|
Nope - I definitely mean Row based security - but those are some good tips anyway
|
|
|
|
|
Hi,
I have a query that needs to act as one single query:
Here's the first part:
select distinct a.officer as Officer, count(distinct(j.fstatus))as Escrow_Type, count(distinct(j.amount))as Amount, count(distinct(d.open_date))as [Open], count(distinct(d.close_date)) as Closed, count(distinct(can_date))as Cancelled
from a10 a
inner join escrow d on a.escrow = d.escrow
inner join e120 j on j.escrow = d.escrow where j.id_scr = 'e21 ' and j.fstatus = 'PAID' group by a.officer
Here's the second part:
x.amount as New from escrow k inner join e120 x on k.escrow = x.escrow
inner join a10 g on x.escrow = g.escrow where k.ftype = 'S' group by x.amount, g.officer having x.amount <> 0.0
Here's the third part:
b.amount as Refi from escrow c inner join e120 b on c.escrow = b.escrow
inner join a10 f on c.escrow = f.escrow where c.ftype = 'R' group by b.amount, f.officer having b.amount <> 0.0
Is there a way to make this act as one single query? I have an application that reads only one cursor at a time.
Thanks In Advance,
Nino
|
|
|
|
|
I must ask why is the second part using different alias names from the third part? The queries seem to only differ by escrow.ftype.
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|
|
My reasoning behind that was to get the values of two different fields.
The second part is getting the values for the 'S' which is defined as a "New" escrow sale.
The third part is getting the values for the 'R' which is defined as a "Refi" or refinance.
After these two fields are retrieved they are then added based on the escrow field based on the join.
Nino
|
|
|
|
|
I might ask why the second & third part have 'GROUP BY' & 'HAVING' clauses when there is only 1 field selected and it is not an aggregate.
I also question the counting of distinct dates in the first query. Can't an officer handle more then one open/closed/cancelled transaction per day?
|
|
|
|