Showing posts with label access. Show all posts
Showing posts with label access. Show all posts

Thursday, March 29, 2012

Adding a restricted role to SQL Server 2005

I have a database and I want to grant an external user access to only one
view in my database. Using SQL Studio I generated these scripts and ran
them.
Once I did that I logged into the database as [loginExternalApp] and was
happy that I could not see any of the raw tables. But I found that I could
SELECT from all of the views in my database, not just the one I granted the
SELECT to.
What did I miss? I thought by default that the new role would have no
permissions for anything that I did not grant. It doesn't seem right that I
would need to specifically deny access to all of the views.
Any thoughts would be welcome.
Richard Speiss
Here is the script that I ran
USE [master]
GO
CREATE LOGIN [loginExternalApp] WITH PASSWORD=N'password',
DEFAULT_DATABASE=[TestDB], CHECK_EXPIRATION=OFF
GO
USE [TestDB]
GO
CREATE USER [userExternalApp] FOR LOGIN [loginExternalApp]
GO
CREATE ROLE [roleExternalApp]
GO
EXEC sp_addrolemember N'roleExternalApp', N'useExternalApp'
GO
GRANT SELECT ON [dbo].[vTestView] TO [roleExternalApp]
GO
Hi Richard,
Verify the permissions granted to the public role. Every user is a member of
the public role and has access to the objects granted to it.
Right-click any of these views in Management Studio, select Properties and
Permissions. See if permissions have been granted to public.
Also, you are not talking about catalog views, right?
Hope this helps,
Ben Nevarez
"Richard Speiss" wrote:

> I have a database and I want to grant an external user access to only one
> view in my database. Using SQL Studio I generated these scripts and ran
> them.
> Once I did that I logged into the database as [loginExternalApp] and was
> happy that I could not see any of the raw tables. But I found that I could
> SELECT from all of the views in my database, not just the one I granted the
> SELECT to.
> What did I miss? I thought by default that the new role would have no
> permissions for anything that I did not grant. It doesn't seem right that I
> would need to specifically deny access to all of the views.
> Any thoughts would be welcome.
> Richard Speiss
>
> Here is the script that I ran
> USE [master]
> GO
> CREATE LOGIN [loginExternalApp] WITH PASSWORD=N'password',
> DEFAULT_DATABASE=[TestDB], CHECK_EXPIRATION=OFF
> GO
> USE [TestDB]
> GO
> CREATE USER [userExternalApp] FOR LOGIN [loginExternalApp]
> GO
> CREATE ROLE [roleExternalApp]
> GO
> EXEC sp_addrolemember N'roleExternalApp', N'useExternalApp'
> GO
> GRANT SELECT ON [dbo].[vTestView] TO [roleExternalApp]
> GO
>
>
|||Thanks, those views are granting 'public' accessibility (user views, not
catalog views)
I don't see an easy way to disable the 'public' role though or to get my
[userExternalApp] to not be part of 'public'.
Is there any way to disable the public role or do I need to explicitly
revoke permissions to public on each view (and/or table, etc)?
Thanks again
Richard
"Ben Nevarez" <bnevarez@.no.spam.please.sunamerica.com> wrote in message
news:449C85C5-A8D8-49F5-8480-80584D1E91CD@.microsoft.com...[vbcol=seagreen]
> Hi Richard,
> Verify the permissions granted to the public role. Every user is a member
> of
> the public role and has access to the objects granted to it.
> Right-click any of these views in Management Studio, select Properties and
> Permissions. See if permissions have been granted to public.
> Also, you are not talking about catalog views, right?
> Hope this helps,
> Ben Nevarez
>
>
> "Richard Speiss" wrote:

Adding a restricted role to SQL Server 2005

I have a database and I want to grant an external user access to only one
view in my database. Using SQL Studio I generated these scripts and ran
them.
Once I did that I logged into the database as [loginExternalApp] and was
happy that I could not see any of the raw tables. But I found that I could
SELECT from all of the views in my database, not just the one I granted the
SELECT to.
What did I miss? I thought by default that the new role would have no
permissions for anything that I did not grant. It doesn't seem right that I
would need to specifically deny access to all of the views.
Any thoughts would be welcome.
Richard Speiss
Here is the script that I ran
USE [master]
GO
CREATE LOGIN [loginExternalApp] WITH PASSWORD=N'password',
DEFAULT_DATABASE=[TestDB], CHECK_EXPIRATION=OFF
GO
USE [TestDB]
GO
CREATE USER [userExternalApp] FOR LOGIN [loginExternalApp]
GO
CREATE ROLE [roleExternalApp]
GO
EXEC sp_addrolemember N'roleExternalApp', N'useExternalApp'
GO
GRANT SELECT ON [dbo].[vTestView] TO [roleExternalApp]
GOHi Richard,
Verify the permissions granted to the public role. Every user is a member of
the public role and has access to the objects granted to it.
Right-click any of these views in Management Studio, select Properties and
Permissions. See if permissions have been granted to public.
Also, you are not talking about catalog views, right?
Hope this helps,
Ben Nevarez
"Richard Speiss" wrote:
> I have a database and I want to grant an external user access to only one
> view in my database. Using SQL Studio I generated these scripts and ran
> them.
> Once I did that I logged into the database as [loginExternalApp] and was
> happy that I could not see any of the raw tables. But I found that I could
> SELECT from all of the views in my database, not just the one I granted the
> SELECT to.
> What did I miss? I thought by default that the new role would have no
> permissions for anything that I did not grant. It doesn't seem right that I
> would need to specifically deny access to all of the views.
> Any thoughts would be welcome.
> Richard Speiss
>
> Here is the script that I ran
> USE [master]
> GO
> CREATE LOGIN [loginExternalApp] WITH PASSWORD=N'password',
> DEFAULT_DATABASE=[TestDB], CHECK_EXPIRATION=OFF
> GO
> USE [TestDB]
> GO
> CREATE USER [userExternalApp] FOR LOGIN [loginExternalApp]
> GO
> CREATE ROLE [roleExternalApp]
> GO
> EXEC sp_addrolemember N'roleExternalApp', N'useExternalApp'
> GO
> GRANT SELECT ON [dbo].[vTestView] TO [roleExternalApp]
> GO
>
>|||Thanks, those views are granting 'public' accessibility (user views, not
catalog views)
I don't see an easy way to disable the 'public' role though or to get my
[userExternalApp] to not be part of 'public'.
Is there any way to disable the public role or do I need to explicitly
revoke permissions to public on each view (and/or table, etc)?
Thanks again
Richard
"Ben Nevarez" <bnevarez@.no.spam.please.sunamerica.com> wrote in message
news:449C85C5-A8D8-49F5-8480-80584D1E91CD@.microsoft.com...
> Hi Richard,
> Verify the permissions granted to the public role. Every user is a member
> of
> the public role and has access to the objects granted to it.
> Right-click any of these views in Management Studio, select Properties and
> Permissions. See if permissions have been granted to public.
> Also, you are not talking about catalog views, right?
> Hope this helps,
> Ben Nevarez
>
>
> "Richard Speiss" wrote:
>> I have a database and I want to grant an external user access to only one
>> view in my database. Using SQL Studio I generated these scripts and ran
>> them.
>> Once I did that I logged into the database as [loginExternalApp] and was
>> happy that I could not see any of the raw tables. But I found that I
>> could
>> SELECT from all of the views in my database, not just the one I granted
>> the
>> SELECT to.
>> What did I miss? I thought by default that the new role would have no
>> permissions for anything that I did not grant. It doesn't seem right
>> that I
>> would need to specifically deny access to all of the views.
>> Any thoughts would be welcome.
>> Richard Speiss
>>
>> Here is the script that I ran
>> USE [master]
>> GO
>> CREATE LOGIN [loginExternalApp] WITH PASSWORD=N'password',
>> DEFAULT_DATABASE=[TestDB], CHECK_EXPIRATION=OFF
>> GO
>> USE [TestDB]
>> GO
>> CREATE USER [userExternalApp] FOR LOGIN [loginExternalApp]
>> GO
>> CREATE ROLE [roleExternalApp]
>> GO
>> EXEC sp_addrolemember N'roleExternalApp', N'useExternalApp'
>> GO
>> GRANT SELECT ON [dbo].[vTestView] TO [roleExternalApp]
>> GO
>>

Sunday, March 25, 2012

Adding a index automatically...

Hi, still new to all this I'm afraid! I've created a DTS routine that copys some table data from an Access database into another Access database. In the second mdb, I would like the routine to add an ID field and populate all the lines. I'm sure it must be kind of easy but I can't find how!

Any help appreciated.Ah sorted - just added the ID as an Identity when the table was being created in the routine.

Adding a default value to a table

I'm new to SQL server and am in the process of converting an Access Db to SQL.

What I'd like to happen is for the current date and an Autonumber generated as soon as the user enters a value in another field. This was fairly straightforward in Access. When I try to set the default in design table (inSQL), the date() is not available. After a little research I came up with CREATE DEFAULT and Bind column commands, Global variables, etc.

I have a couple of questions for anyone that might know:

Is there an easier way than this to create default values in a table? AND,

Would I also have to bind columns for Table lookups? For example, if I wanted a price to be returned after the product ID was entered (Automatic in Access if relationship/form setup properly), would I have to bind the column? Or would it happen automatically?you can use getdate() or current_timestamp instead of date()

for "lookup" feature of access you can create calculated field.

adding a datestamp automatically

Hi,
As a convert from Access, I need a little help please.
I need to get a datestamp into a new record when it is created.
I can see the line for Default Value, but don't know what code to insert
here.
Many thanks,
NEIL
In news:csisi5$9ge$1$8300dec7@.news.demon.co.uk,
Neil Jarman <neil@.tNOiSPAMvPLEASEy.co.uk> said:
> Hi,
> As a convert from Access, I need a little help please.
> I need to get a datestamp into a new record when it is created.
> I can see the line for Default Value, but don't know what code to
> insert here.
Default should be:
getDate()
Steve
|||Hi Steve,
Many thanks!
NEIL
"Steve" <steve@.somewhere.invalid.com> wrote in message
news:FH6Hd.958160$2W1.74289@.news.easynews.com...
> In news:csisi5$9ge$1$8300dec7@.news.demon.co.uk,
> Neil Jarman <neil@.tNOiSPAMvPLEASEy.co.uk> said:
> Default should be:
> getDate()
> --
> Steve
>

adding a datestamp automatically

Hi,
As a convert from Access, I need a little help please.
I need to get a datestamp into a new record when it is created.
I can see the line for Default Value, but don't know what code to insert
here.
Many thanks,
NEILIn news:csisi5$9ge$1$8300dec7@.news.demon.co.uk,
Neil Jarman <neil@.tNOiSPAMvPLEASEy.co.uk> said:
> Hi,
> As a convert from Access, I need a little help please.
> I need to get a datestamp into a new record when it is created.
> I can see the line for Default Value, but don't know what code to
> insert here.
Default should be:
getDate()
Steve|||Hi Steve,
Many thanks!
NEIL
"Steve" <steve@.somewhere.invalid.com> wrote in message
news:FH6Hd.958160$2W1.74289@.news.easynews.com...
> In news:csisi5$9ge$1$8300dec7@.news.demon.co.uk,
> Neil Jarman <neil@.tNOiSPAMvPLEASEy.co.uk> said:
> Default should be:
> getDate()
> --
> Steve
>

adding a datestamp automatically

Hi,
As a convert from Access, I need a little help please.
I need to get a datestamp into a new record when it is created.
I can see the line for Default Value, but don't know what code to insert
here.
Many thanks,
NEILIn news:csisi5$9ge$1$8300dec7@.news.demon.co.uk,
Neil Jarman <neil@.tNOiSPAMvPLEASEy.co.uk> said:
> Hi,
> As a convert from Access, I need a little help please.
> I need to get a datestamp into a new record when it is created.
> I can see the line for Default Value, but don't know what code to
> insert here.
Default should be:
getDate()
--
Steve|||Hi Steve,
Many thanks!
NEIL
"Steve" <steve@.somewhere.invalid.com> wrote in message
news:FH6Hd.958160$2W1.74289@.news.easynews.com...
> In news:csisi5$9ge$1$8300dec7@.news.demon.co.uk,
> Neil Jarman <neil@.tNOiSPAMvPLEASEy.co.uk> said:
>> Hi,
>> As a convert from Access, I need a little help please.
>> I need to get a datestamp into a new record when it is created.
>> I can see the line for Default Value, but don't know what code to
>> insert here.
> Default should be:
> getDate()
> --
> Steve
>

Thursday, March 22, 2012

Adding a Adam group to SQL Server

Hello all, I 'm not sure if this is the right forum for this, and I apologies if so...

But in a nut shell I'm attempting to grant SQL server access to a ADAM user group account within an ADAM instance.

I have set up the ADAM instance. Added the ADAM user to an ADAM security group. now I need to add that user group to a SQL instance that resides on our AD domain ( non-ADAM instance.) obviously when I attempt to view all available domains within SQL security manager, all I see is our standard domain, I can't seem to figure out how to make the ADAM domain visible to our AD domain.

Any Thoughts?

Thanks

Unfortunately I am not familiar with ADAM, and given that there hasn't been any response yet I would assume most people in this forum have limited or no experience on this topic either.

I would suggest asking in the Windows or AD forums and find out if there is a difference in ADAM authetntication with respect of regular ADs.

-Raul Garcia

SDE/T

SQL Server Engine

|||Will do. Thank you.|||

Not possible. ADAM is not a network OS like AD.... ADAM groups aren't available to SQL server ...

what you can do is: If all your users exist in AD and your ADAM is domain joined, create the groups in AD instead and use them in ADAM as well. ADAM can use AD security principals for Authentication and Authorization.

thanks

Adding a Adam group to SQL Server

Hello all, I 'm not sure if this is the right forum for this, and I apologies if so...

But in a nut shell I'm attempting to grant SQL server access to a ADAM user group account within an ADAM instance.

I have set up the ADAM instance. Added the ADAM user to an ADAM security group. now I need to add that user group to a SQL instance that resides on our AD domain ( non-ADAM instance.) obviously when I attempt to view all available domains within SQL security manager, all I see is our standard domain, I can't seem to figure out how to make the ADAM domain visible to our AD domain.

Any Thoughts?

Thanks

Unfortunately I am not familiar with ADAM, and given that there hasn't been any response yet I would assume most people in this forum have limited or no experience on this topic either.

I would suggest asking in the Windows or AD forums and find out if there is a difference in ADAM authetntication with respect of regular ADs.

-Raul Garcia

SDE/T

SQL Server Engine

|||Will do. Thank you.|||

Not possible. ADAM is not a network OS like AD.... ADAM groups aren't available to SQL server ...

what you can do is: If all your users exist in AD and your ADAM is domain joined, create the groups in AD instead and use them in ADAM as well. ADAM can use AD security principals for Authentication and Authorization.

thanks

sql

Adding a Adam group to SQL Server

Hello all, I 'm not sure if this is the right forum for this, and I apologies if so...

But in a nut shell I'm attempting to grant SQL server access to a ADAM user group account within an ADAM instance.

I have set up the ADAM instance. Added the ADAM user to an ADAM security group. now I need to add that user group to a SQL instance that resides on our AD domain ( non-ADAM instance.) obviously when I attempt to view all available domains within SQL security manager, all I see is our standard domain, I can't seem to figure out how to make the ADAM domain visible to our AD domain.

Any Thoughts?

Thanks

Unfortunately I am not familiar with ADAM, and given that there hasn't been any response yet I would assume most people in this forum have limited or no experience on this topic either.

I would suggest asking in the Windows or AD forums and find out if there is a difference in ADAM authetntication with respect of regular ADs.

-Raul Garcia

SDE/T

SQL Server Engine

|||Will do. Thank you.|||

Not possible. ADAM is not a network OS like AD.... ADAM groups aren't available to SQL server ...

what you can do is: If all your users exist in AD and your ADAM is domain joined, create the groups in AD instead and use them in ADAM as well. ADAM can use AD security principals for Authentication and Authorization.

thanks

Tuesday, March 20, 2012

Added text field to database. New entries not equal to ""

Hi!
I'm accessing an MS Access database from an ASP server.
I just added a new text column (field) to one of my tables. I have not added
any data to this new field in any of the rows.
I read the field in and compare it to "" and it's coming up as false.
How do identify the empty fields?
'ASP code - Never produces "Blank"
if rsSet("region") = "" then response.write "Blank" else response.write
rsSet("region")
Try
If IsNull (rsSet("region")) Then Response.Write "Null" Else Response.Write
rsSet("region")
Alan
"Noozer" <dont.spam@.me.here> wrote in message
news:IVmAc.755870$Pk3.730376@.pd7tw1no...
> Hi!
> I'm accessing an MS Access database from an ASP server.
> I just added a new text column (field) to one of my tables. I have not
added
> any data to this new field in any of the rows.
> I read the field in and compare it to "" and it's coming up as false.
> How do identify the empty fields?
> 'ASP code - Never produces "Blank"
> if rsSet("region") = "" then response.write "Blank" else response.write
> rsSet("region")
>
|||Thanks!
"Alan Howard" <Xalan.howardX@.Xparadise.net.nzX> wrote in message
news:ONCUTnKVEHA.2928@.tk2msftngp13.phx.gbl...
> Try
> If IsNull (rsSet("region")) Then Response.Write "Null" Else Response.Write
> rsSet("region")
> Alan
> "Noozer" <dont.spam@.me.here> wrote in message
> news:IVmAc.755870$Pk3.730376@.pd7tw1no...
> added
>
|||And there are sometimes occasions when it could be a Null, or it could be a
blank. If you want to check for both at once, use:
If Len(rsSet("region") & "") = 0 Then Response.Write "Nothing" Else
Response.Write rsSet("region")
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
"Noozer" <dont.spam@.me.here> wrote in message
news:4MnAc.791748$oR5.380643@.pd7tw3no...[vbcol=seagreen]
> Thanks!
> "Alan Howard" <Xalan.howardX@.Xparadise.net.nzX> wrote in message
> news:ONCUTnKVEHA.2928@.tk2msftngp13.phx.gbl...
Response.Write[vbcol=seagreen]
response.write
>

Added text field to database. New entries not equal to ""

Hi!
I'm accessing an MS Access database from an ASP server.
I just added a new text column (field) to one of my tables. I have not added
any data to this new field in any of the rows.
I read the field in and compare it to "" and it's coming up as false.
How do identify the empty fields?
'ASP code - Never produces "Blank"
if rsSet("region") = "" then response.write "Blank" else response.write
rsSet("region")Try
If IsNull (rsSet("region")) Then Response.Write "Null" Else Response.Write
rsSet("region")
Alan
"Noozer" <dont.spam@.me.here> wrote in message
news:IVmAc.755870$Pk3.730376@.pd7tw1no...
> Hi!
> I'm accessing an MS Access database from an ASP server.
> I just added a new text column (field) to one of my tables. I have not
added
> any data to this new field in any of the rows.
> I read the field in and compare it to "" and it's coming up as false.
> How do identify the empty fields?
> 'ASP code - Never produces "Blank"
> if rsSet("region") = "" then response.write "Blank" else response.write
> rsSet("region")
>|||Thanks!
"Alan Howard" <Xalan.howardX@.Xparadise.net.nzX> wrote in message
news:ONCUTnKVEHA.2928@.tk2msftngp13.phx.gbl...
> Try
> If IsNull (rsSet("region")) Then Response.Write "Null" Else Response.Write
> rsSet("region")
> Alan
> "Noozer" <dont.spam@.me.here> wrote in message
> news:IVmAc.755870$Pk3.730376@.pd7tw1no...
> added
>|||And there are sometimes occasions when it could be a Null, or it could be a
blank. If you want to check for both at once, use:
If Len(rsSet("region") & "") = 0 Then Response.Write "Nothing" Else
Response.Write rsSet("region")
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
"Noozer" <dont.spam@.me.here> wrote in message
news:4MnAc.791748$oR5.380643@.pd7tw3no...
> Thanks!
> "Alan Howard" <Xalan.howardX@.Xparadise.net.nzX> wrote in message
> news:ONCUTnKVEHA.2928@.tk2msftngp13.phx.gbl...
Response.Write[vbcol=seagreen]
response.write[vbcol=seagreen]
>sql

Thursday, March 8, 2012

Add record

Hello,
I am just starting with SQL Server 2005 and I would like to know if it
is possible to add a record to a table as I do in Microsoft Access, by
opening the table, or can I only do it executing a Stored Procedure?
Thanks,
Miguel
Hello,
You can do this in SQL Server Management Studio. Just connect to SQL
Server-- expand databases-- tables --right click above table and open.
There you can enter data and save..
Thanks
Hari
"shapper" <mdmoura@.gmail.com> wrote in message
news:1164768583.433805.262850@.j44g2000cwa.googlegr oups.com...
> Hello,
> I am just starting with SQL Server 2005 and I would like to know if it
> is possible to add a record to a table as I do in Microsoft Access, by
> opening the table, or can I only do it executing a Stored Procedure?
> Thanks,an do this
> Miguel
>
|||shapper wrote:
> Hello,
> I am just starting with SQL Server 2005 and I would like to know if it
> is possible to add a record to a table as I do in Microsoft Access, by
> opening the table, or can I only do it executing a Stored Procedure?
> Thanks,
> Miguel
>
You *can* manipulate a table using the GUI, but it's not recommended.
You can add rows to a table using a simple INSERT statement typed into a
query window. Using the GUI can lead to unexpected locking problems.
Tracy McKibben
MCDBA
http://www.realsqlguy.com

Add record

Hello,
I am just starting with SQL Server 2005 and I would like to know if it
is possible to add a record to a table as I do in Microsoft Access, by
opening the table, or can I only do it executing a Stored Procedure?
Thanks,
MiguelHello,
You can do this in SQL Server Management Studio. Just connect to SQL
Server-- expand databases-- tables --right click above table and open.
There you can enter data and save..
Thanks
Hari
"shapper" <mdmoura@.gmail.com> wrote in message
news:1164768583.433805.262850@.j44g2000cwa.googlegroups.com...
> Hello,
> I am just starting with SQL Server 2005 and I would like to know if it
> is possible to add a record to a table as I do in Microsoft Access, by
> opening the table, or can I only do it executing a Stored Procedure?
> Thanks,an do this
> Miguel
>|||shapper wrote:
> Hello,
> I am just starting with SQL Server 2005 and I would like to know if it
> is possible to add a record to a table as I do in Microsoft Access, by
> opening the table, or can I only do it executing a Stored Procedure?
> Thanks,
> Miguel
>
You *can* manipulate a table using the GUI, but it's not recommended.
You can add rows to a table using a simple INSERT statement typed into a
query window. Using the GUI can lead to unexpected locking problems.
Tracy McKibben
MCDBA
http://www.realsqlguy.com

Add record

Hello,
I am just starting with SQL Server 2005 and I would like to know if it
is possible to add a record to a table as I do in Microsoft Access, by
opening the table, or can I only do it executing a Stored Procedure?
Thanks,
MiguelHello,
You can do this in SQL Server Management Studio. Just connect to SQL
Server-- expand databases-- tables --right click above table and open.
There you can enter data and save..
Thanks
Hari
"shapper" <mdmoura@.gmail.com> wrote in message
news:1164768583.433805.262850@.j44g2000cwa.googlegroups.com...
> Hello,
> I am just starting with SQL Server 2005 and I would like to know if it
> is possible to add a record to a table as I do in Microsoft Access, by
> opening the table, or can I only do it executing a Stored Procedure?
> Thanks,an do this
> Miguel
>|||shapper wrote:
> Hello,
> I am just starting with SQL Server 2005 and I would like to know if it
> is possible to add a record to a table as I do in Microsoft Access, by
> opening the table, or can I only do it executing a Stored Procedure?
> Thanks,
> Miguel
>
You *can* manipulate a table using the GUI, but it's not recommended.
You can add rows to a table using a simple INSERT statement typed into a
query window. Using the GUI can lead to unexpected locking problems.
Tracy McKibben
MCDBA
http://www.realsqlguy.com

Tuesday, March 6, 2012

Add new datasource C++ sqlexpress does not work

I have Visual C++ Express edition and SQL Express edition installed. When I try to add a datasource, the only two choices are Microsoft Access and SQL Server File. This SQL one does not work when I select it with an error that it was "Unable to open the physical file x.mdf. Operating system error 32: 32(The process cannot access the file because it is being used by another process.). An attempt to attach an auto-named database.... When I do my own

System::Data::SqlClient::SqlConnection ^ c0;

System::Data::SqlClient::SqlCommand ^ k0;

System::Data::SqlClient::SqlDataReader ^ r0;

things work fine. Do I need to get a $ edition, download something extra, connect to the a different file (master.mdf and not x.mdf), repair/reinstall, ...?

I would note that it destroyed my msde mdf in previous attempts before I decided to try only the sql express server as a datasource.

I haven't really used VC++ express, but I'll have a go at solving the problem. You shouldn't need to buy the $ edition of SQL Server, or download something extra. In the past when I've seen this error, it has either been to do with file permissions or another instance being attached to the file. Verify that the user you're currently logged on as has full permissions on the file you are trying to connect to.

If this doesn't help, maybe post the connection strings you are using up.

|||

For some reason I am not quite sure, when I tried to set up a datasource today after a reboot and not opening and debugging a project that had a manually written connection that worked, I was successful in getting the gui wizard to work.

Thanks.

add new colums to existing table with Access

is it possible to add new columns to an existing MSDE table using
Access? If not what is the best practices modify a table schema without
loosing data?
Thanks for any suggestions.
Micheal,
You can register this msde server to another sql server's enterprise
manager. Or, you could use osql at the command prompt, then do an ALTER
TABLE and add the columns you need.
Cheers,
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.
|||Micheal,
You can register this msde server to another sql server's enterprise
manager. Or, you could use osql at the command prompt, then do an ALTER
TABLE and add the columns you need.
Cheers,
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.

Friday, February 24, 2012

Add domain user?

Hi,
By default, when add a domain user in the Domain Controller, is it this new
user can access the sql data?
public role only? Thanks...By default, a new AD user will have no access to a specific SQL Server
unless they are added to a windows group that has access to SQL Server or
their domain account is explicitly added as a login.
HTH
Jasper Smith (SQL Server MVP)
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"js" <js@.someone@.hotmail.com> wrote in message
news:uB%23HnU3MEHA.3712@.TK2MSFTNGP10.phx.gbl...
> Hi,
> By default, when add a domain user in the Domain Controller, is it this
new
> user can access the sql data?
> public role only? Thanks...
>|||Thanks Jasper.
Another question about this one: if a particular role of which the user is a
member has been denied a specific object permission (such as SELECT), the
user is unable to exercise that permission. The most restrictive permission
(DENY) takes precedence.
What will happen in this case: MYDN\Test is belonging to local administrator
group and System Admin Server Role. And I set "db_denydatawriter" to this
user in Northwind database. Can this user exec the "Updte ." statement in
Northwind's table?
Please advice...
"Jasper Smith" <jasper_smith9@.hotmail.com> wrote in message
news:OSzDVD5MEHA.2592@.tk2msftngp13.phx.gbl...
> By default, a new AD user will have no access to a specific SQL Server
> unless they are added to a windows group that has access to SQL Server or
> their domain account is explicitly added as a login.
> --
> HTH
> Jasper Smith (SQL Server MVP)
> I support PASS - the definitive, global
> community for SQL Server professionals -
> http://www.sqlpass.org
>
> "js" <js@.someone@.hotmail.com> wrote in message
> news:uB%23HnU3MEHA.3712@.TK2MSFTNGP10.phx.gbl...
> new
>|||SA will overrule. The user will be SA.
Jeff Duncan
MCDBA, MCSE+I
"js" <js@.someone@.hotmail.com> wrote in message
news:edWLIh5MEHA.1644@.TK2MSFTNGP09.phx.gbl...
> Thanks Jasper.
> Another question about this one: if a particular role of which the user is
> a
> member has been denied a specific object permission (such as SELECT), the
> user is unable to exercise that permission. The most restrictive
> permission
> (DENY) takes precedence.
> What will happen in this case: MYDN\Test is belonging to local
> administrator
> group and System Admin Server Role. And I set "db_denydatawriter" to this
> user in Northwind database. Can this user exec the "Updte ." statement in
> Northwind's table?
>
> Please advice...
>
> "Jasper Smith" <jasper_smith9@.hotmail.com> wrote in message
> news:OSzDVD5MEHA.2592@.tk2msftngp13.phx.gbl...
>|||Thanks Jeff.
How to assign denywrite to MYDN\Test have without by removing it from local
administrator?
If I take out the db_owner from BUILTIN\Administrators will cause any
problem'
"Jeff Duncan" <jduncan@.gtefcu.org> wrote in message
news:eq5wXr5MEHA.3208@.TK2MSFTNGP10.phx.gbl...
> SA will overrule. The user will be SA.
> --
> Jeff Duncan
> MCDBA, MCSE+I
> "js" <js@.someone@.hotmail.com> wrote in message
> news:edWLIh5MEHA.1644@.TK2MSFTNGP09.phx.gbl...
is[vbcol=seagreen]
the[vbcol=seagreen]
this[vbcol=seagreen]
in[vbcol=seagreen]
or[vbcol=seagreen]
>|||Go through it first with a fine tooth comb. Make sure the ID that is
running SQL has access by itself and not in a group. Make sure that the
proper Local Admins have direct access accounts and then remove it. Make
yourself a standard login first just for safe keeping if you are in mixed
mode. You should be fine.
Jeff Duncan
MCDBA, MCSE+I
"js" <js@.someone@.hotmail.com> wrote in message
news:O86FNw5MEHA.3472@.TK2MSFTNGP10.phx.gbl...
> Thanks Jeff.
> How to assign denywrite to MYDN\Test have without by removing it from
> local
> administrator?
> If I take out the db_owner from BUILTIN\Administrators will cause any
> problem'
>
>
> "Jeff Duncan" <jduncan@.gtefcu.org> wrote in message
> news:eq5wXr5MEHA.3208@.TK2MSFTNGP10.phx.gbl...
> is
> the
> this
> in
> or
>

Monday, February 13, 2012

AD/ SQL Server 2000/ Trusted Connection in .Net

Hi,
I have a Windows Application, a Novell Network and a SQL Server 2000 on an
Active Directory controlled server. My AD account has access to teh database.
I want to login to the database using an Active Directory account, trusted
security...but I can't.
Sequence of Events:
1. Login to Network using Novell account.
2. Start Application and it displays login screen.
3. Enter AD account details and press OK
4. This verifies against Active Directory Account using the following code:
visual basic
code:---- Public Function Login() As String
' now create the directory entry to establish connection
Dim deDirEntry As New DirectoryEntry(Me.strDomain, Me.strUser,
Me.strPass, Me.atAuthentType)
Try
' if user is verified then it will welcome then
Try
Return deDirEntry.Username
Catch exp As Exception
Return ""
End Try
Finally
'deDirEntry.Dispose()
End Try
End Function 'Login
This all works fine and returns the username if the credentials match
5. Make database connection string (sUserName is the AD username):
visual basic
code:----Dim
sConnstring As String = "User ID=" & sUserName & ";Initial
Catalog=VendorSample;Data
Source=MyServer...;Timeout=20;Trusted_Connection=T rue"----
6. I get the following error:
Login failed for user '(null)'. Reason: Not associated witha trusted SQl
Server connection.
I'm not well up on how AD works etc. but does anybody have any idea how to
get past this? I presume the problem is that it is not recognising the
username passed as the account I want to use.
There are two ways to logging into SQL Server: WIndows Security
(Trusted_Connection) or SQL Server Security. In either case, your "Login"
function is useless.
In your connectionString, you have "Trusted_Connection=True", that implies
the SQL Server uses Windows security, meaning, you do not need pass
username/password pair in ConnectionString (even there is user/password,
they are ignored). That means SQL Server accept the current windows/AD user
account credential, and then does the authorization based on this
credential. As long as the the windows/AD user account (which is running
your app) is given adequate permission to what he needs, the app should run
fine.
If you use SQL Server security (it must be enabled), you must have
user/password pair in the ConnectionString, and SQL Server authenticates it,
regardless whether you have done it in your own "Login" function or not. SO,
your "Login" function does nothing usefull here.
"Dec" <Dec@.discussions.microsoft.com> wrote in message
news:E608FA02-488A-4E9A-BC5B-9AF816F28F87@.microsoft.com...
> Hi,
> I have a Windows Application, a Novell Network and a SQL Server 2000 on an
> Active Directory controlled server. My AD account has access to teh
> database.
> I want to login to the database using an Active Directory account, trusted
> security...but I can't.
> Sequence of Events:
> 1. Login to Network using Novell account.
> 2. Start Application and it displays login screen.
> 3. Enter AD account details and press OK
> 4. This verifies against Active Directory Account using the following
> code:
>
> visual basic
> code:----
> Public Function Login() As String
> ' now create the directory entry to establish connection
> Dim deDirEntry As New DirectoryEntry(Me.strDomain, Me.strUser,
> Me.strPass, Me.atAuthentType)
> Try
> ' if user is verified then it will welcome then
> Try
> Return deDirEntry.Username
> Catch exp As Exception
> Return ""
> End Try
> Finally
> 'deDirEntry.Dispose()
> End Try
> End Function 'Login
> ----
> This all works fine and returns the username if the credentials match
> 5. Make database connection string (sUserName is the AD username):
> visual basic
> code:----Dim
> sConnstring As String = "User ID=" & sUserName & ";Initial
> Catalog=VendorSample;Data
> Source=MyServer...;Timeout=20;Trusted_Connection=T rue"----
> 6. I get the following error:
> Login failed for user '(null)'. Reason: Not associated witha trusted SQl
> Server connection.
> I'm not well up on how AD works etc. but does anybody have any idea how to
> get past this? I presume the problem is that it is not recognising the
> username passed as the account I want to use.
|||Hi,
If I have logged onto pc/ network using a windows account, will the app
always run using this account? If so, is there any way to change this so that
the app run using an AD account instead? As you've probably guesed, I'm not
well up on Windows/ AD accounts etc. so please explain in very simple terms!!
Thanks.
"Norman Yuan" wrote:

> There are two ways to logging into SQL Server: WIndows Security
> (Trusted_Connection) or SQL Server Security. In either case, your "Login"
> function is useless.
> In your connectionString, you have "Trusted_Connection=True", that implies
> the SQL Server uses Windows security, meaning, you do not need pass
> username/password pair in ConnectionString (even there is user/password,
> they are ignored). That means SQL Server accept the current windows/AD user
> account credential, and then does the authorization based on this
> credential. As long as the the windows/AD user account (which is running
> your app) is given adequate permission to what he needs, the app should run
> fine.
> If you use SQL Server security (it must be enabled), you must have
> user/password pair in the ConnectionString, and SQL Server authenticates it,
> regardless whether you have done it in your own "Login" function or not. SO,
> your "Login" function does nothing usefull here.
>
> "Dec" <Dec@.discussions.microsoft.com> wrote in message
> news:E608FA02-488A-4E9A-BC5B-9AF816F28F87@.microsoft.com...
>
>

AD/ SQL Server 2000/ Trusted Connection in .Net

Hi,
I have a Windows Application, a Novell Network and a SQL Server 2000 on an
Active Directory controlled server. My AD account has access to teh database.
I want to login to the database using an Active Directory account, trusted
security...but I can't.
Sequence of Events:
1. Login to Network using Novell account.
2. Start Application and it displays login screen.
3. Enter AD account details and press OK
4. This verifies against Active Directory Account using the following code:
visual basic
code:---- Public Function Login() As String
' now create the directory entry to establish connection
Dim deDirEntry As New DirectoryEntry(Me.strDomain, Me.strUser,
Me.strPass, Me.atAuthentType)
Try
' if user is verified then it will welcome then
Try
Return deDirEntry.Username
Catch exp As Exception
Return ""
End Try
Finally
'deDirEntry.Dispose()
End Try
End Function 'Login
----
This all works fine and returns the username if the credentials match
5. Make database connection string (sUserName is the AD username):
visual basic
code:----Dim
sConnstring As String = "User ID=" & sUserName & ";Initial
Catalog=VendorSample;Data
Source=MyServer...;Timeout=20;Trusted_Connection=True"----
6. I get the following error:
Login failed for user '(null)'. Reason: Not associated witha trusted SQl
Server connection.
I'm not well up on how AD works etc. but does anybody have any idea how to
get past this? I presume the problem is that it is not recognising the
username passed as the account I want to use.There are two ways to logging into SQL Server: WIndows Security
(Trusted_Connection) or SQL Server Security. In either case, your "Login"
function is useless.
In your connectionString, you have "Trusted_Connection=True", that implies
the SQL Server uses Windows security, meaning, you do not need pass
username/password pair in ConnectionString (even there is user/password,
they are ignored). That means SQL Server accept the current windows/AD user
account credential, and then does the authorization based on this
credential. As long as the the windows/AD user account (which is running
your app) is given adequate permission to what he needs, the app should run
fine.
If you use SQL Server security (it must be enabled), you must have
user/password pair in the ConnectionString, and SQL Server authenticates it,
regardless whether you have done it in your own "Login" function or not. SO,
your "Login" function does nothing usefull here.
"Dec" <Dec@.discussions.microsoft.com> wrote in message
news:E608FA02-488A-4E9A-BC5B-9AF816F28F87@.microsoft.com...
> Hi,
> I have a Windows Application, a Novell Network and a SQL Server 2000 on an
> Active Directory controlled server. My AD account has access to teh
> database.
> I want to login to the database using an Active Directory account, trusted
> security...but I can't.
> Sequence of Events:
> 1. Login to Network using Novell account.
> 2. Start Application and it displays login screen.
> 3. Enter AD account details and press OK
> 4. This verifies against Active Directory Account using the following
> code:
>
> visual basic
> code:----
> Public Function Login() As String
> ' now create the directory entry to establish connection
> Dim deDirEntry As New DirectoryEntry(Me.strDomain, Me.strUser,
> Me.strPass, Me.atAuthentType)
> Try
> ' if user is verified then it will welcome then
> Try
> Return deDirEntry.Username
> Catch exp As Exception
> Return ""
> End Try
> Finally
> 'deDirEntry.Dispose()
> End Try
> End Function 'Login
> ----
> This all works fine and returns the username if the credentials match
> 5. Make database connection string (sUserName is the AD username):
> visual basic
> code:----Dim
> sConnstring As String = "User ID=" & sUserName & ";Initial
> Catalog=VendorSample;Data
> Source=MyServer...;Timeout=20;Trusted_Connection=True"----
> 6. I get the following error:
> Login failed for user '(null)'. Reason: Not associated witha trusted SQl
> Server connection.
> I'm not well up on how AD works etc. but does anybody have any idea how to
> get past this? I presume the problem is that it is not recognising the
> username passed as the account I want to use.|||Hi,
If I have logged onto pc/ network using a windows account, will the app
always run using this account? If so, is there any way to change this so that
the app run using an AD account instead? As you've probably guesed, I'm not
well up on Windows/ AD accounts etc. so please explain in very simple terms!!
Thanks.
"Norman Yuan" wrote:
> There are two ways to logging into SQL Server: WIndows Security
> (Trusted_Connection) or SQL Server Security. In either case, your "Login"
> function is useless.
> In your connectionString, you have "Trusted_Connection=True", that implies
> the SQL Server uses Windows security, meaning, you do not need pass
> username/password pair in ConnectionString (even there is user/password,
> they are ignored). That means SQL Server accept the current windows/AD user
> account credential, and then does the authorization based on this
> credential. As long as the the windows/AD user account (which is running
> your app) is given adequate permission to what he needs, the app should run
> fine.
> If you use SQL Server security (it must be enabled), you must have
> user/password pair in the ConnectionString, and SQL Server authenticates it,
> regardless whether you have done it in your own "Login" function or not. SO,
> your "Login" function does nothing usefull here.
>
> "Dec" <Dec@.discussions.microsoft.com> wrote in message
> news:E608FA02-488A-4E9A-BC5B-9AF816F28F87@.microsoft.com...
> > Hi,
> > I have a Windows Application, a Novell Network and a SQL Server 2000 on an
> > Active Directory controlled server. My AD account has access to teh
> > database.
> > I want to login to the database using an Active Directory account, trusted
> > security...but I can't.
> > Sequence of Events:
> > 1. Login to Network using Novell account.
> > 2. Start Application and it displays login screen.
> > 3. Enter AD account details and press OK
> > 4. This verifies against Active Directory Account using the following
> > code:
> >
> >
> > visual basic
> > code:----
> > Public Function Login() As String
> > ' now create the directory entry to establish connection
> > Dim deDirEntry As New DirectoryEntry(Me.strDomain, Me.strUser,
> > Me.strPass, Me.atAuthentType)
> > Try
> >
> > ' if user is verified then it will welcome then
> > Try
> > Return deDirEntry.Username
> > Catch exp As Exception
> > Return ""
> > End Try
> > Finally
> > 'deDirEntry.Dispose()
> > End Try
> > End Function 'Login
> > ----
> >
> > This all works fine and returns the username if the credentials match
> > 5. Make database connection string (sUserName is the AD username):
> >
> > visual basic
> > code:----Dim
> > sConnstring As String = "User ID=" & sUserName & ";Initial
> > Catalog=VendorSample;Data
> > Source=MyServer...;Timeout=20;Trusted_Connection=True"----
> > 6. I get the following error:
> > Login failed for user '(null)'. Reason: Not associated witha trusted SQl
> > Server connection.
> >
> > I'm not well up on how AD works etc. but does anybody have any idea how to
> > get past this? I presume the problem is that it is not recognising the
> > username passed as the account I want to use.
>
>