Showing posts with label login. Show all posts
Showing posts with label login. Show all posts

Sunday, March 25, 2012

data driven web site

I am using vb .net 2003 with msde.

I have downloaded microsoft`s vbsdk setup and have it working pretty well until I get to the login page and the provided credentials will not work.

The sample tells me to set permissions in the dacl editor.

1:What is the dacl editor and how do I use it?

2:What do I set permissions to?

I have been through the code provided over and over and can`t seem to find anything wrong,So I figure maybe this is the problem.

Any help will be appreciated.

Davco

Hi,

this is a SQL Server related forum and this seems more like a problem within the SDk walkthrough. perhpas it would be better to try your question in the ASP.NET forums.

HTH, jens K. Suessmeyer.

http://www.sqlserver2005.de

Wednesday, March 7, 2012

Data Available in a Trigger

I am creating a transaction log trigger for a table.

I would like to log the following data

The user login id: SYSTEM_USER

The User's Computer name: ?

The servers time and date: GetDate()

The trigger Action: Update, Delete, or Insert

The unique record ID for the affected table:

One column for the deleted row in xml raw:

One column for the inserted row in xml raw:

Is there a way to get the users computer name?

Consider this:

"select * from inserts for xml raw"

This is nice because i want to store the inserted and/or deleted table information as xml columns. But I would like to handle the transaction log in a way that created one transaction row add per row in the inserted or deleted table.

My end goal is to insert into the transaction log table as follows:

Lets say that my update trigger contains an inserted table with two rows and the deleted table would have the same, two rows.

I would like to insert two rows into my transaction log. with the username, date time, action and one column for the inserted row as xml raw, and one column for the deleted row as xml raw.

Anyone know how to do this?

It would be nice if i could impliment something like this:

'select * as xml raw from inserted' And it ould return as many rows as is in the inserted table, each row having one column wich represents that row in xml format.

'select * from inserted for xml raw' This is not good because it returns one row with one column whose value is an xml representation of the entire inserted table.

Thanx

Jerry Cicierega

The host_name() function will return this information, but it is not always set. Try looking this up in books online.|||

Thank you for responding. Yes this works on my system. The computer name part of my issue is solved.

The xml part of my question still stands.

Thank you !

Sunday, February 19, 2012

dafult database is not master

Hello,

I'm a c# programmer and a SQL Server 2005 newby so...be gentle with me !
Here is my problem. I used to log on my computer with login A. while using this login, I've created a couple of databases on SQL SERVER Express with SQLServer managment studio express (FolkTaleDb, AdventureWork, etc...). One day, the ITManager changed my login access to my computer to LoginB (for some reason, LoginA is still activ in ActivDirectory so I can still use it). With that new login, I've only created one new database called TestSpatial. Well now, when I connect to SQLServer without explicitly mentionning the initial catalog in the connectionstring (I connect from my VS application), the default database is master when logged as LoginA, but TestSpatial when logged as LoginB ! I have to type explicitly 'master' (in my connectionstring) in order to connect to master instead of TestSpatial. How can I sort this out ?

Any help is welcomed !

David HILPIPRESue either the GUI to change your default database or the command sp_defaultdb.

Jens K. Suessmeyer:


http://www.sqlserver2005.de