Showing posts with label visual. Show all posts
Showing posts with label visual. Show all posts

Thursday, March 22, 2012

Database Filename error -- cannot create db From MS online tutorials

I am using VB with Visual Studio Express. I am new to these tools. I have SQL Server 2005 Express installed on my machine. I think that I have the right version. I am just using Express for taking classes and teaching myself on my machine.

When I follow the examples in the book, I keep getting this error when I go to my ASP.NET configuration and click on the security tab to add myself as a user.

"There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store.

The following message may help in diagnosing the problem:The database filename can not contain the following 3 characters: [ (open square brace), ] (close square brace) and ' (single quote) " -- end of erro msg.

I have an apostrophe in my last name. Could that be what is causing it? Is it creating a db based on my name or something? Or do I have the wrong version of SQL Server Express installed.

Thank you for any help. I appreciate it.

--Mark

Have you checked Provide of your ASP.NET configuration? Just go to Provide panel and 'Test' it. Can you see any error message?

Wednesday, March 21, 2012

Database Explorer Advanced Connection Settings

In SQL Visual Basic 2005 Express Edition, I was wondering if it is possible in the Add Connection dialog under Advanced settings to change the Data Source SQL server from the local .\sqlexpress to a network SQL Express server. It seems as though the option is locked. I am in a doman, and using Windows Authentication. I also have TCP/IP enabled on the SQL server, and no firewall restrictions for the SQL service. Also, my account permissions should also allow me to do this.

John55616

You'd be better off asking this question inthe VB Express forum since this is a VB dialog box. I believe that the VS Express products limit you to local only connections when working with the UI tools but I don't have a copy installed at this time to validate.

You can still access remote servers in code using a SqlConnection object and just specifying the connection string, but in terms of UI, VS Express is targeted at local data storage. This limitation does not exist for VS Standard and above.

Mike

|||

I think you're right about the local connections Mike. I am able to connect locally, which is perfect for testing.

Thanks.

Monday, March 19, 2012

Database display/manipulation

I have a web page called homepage.aspx created in Visual Studio 2005 using VB. It contains some hyperlinks on the left side. I have a database created in SQL Server 2005. I need to add, delete, edit, update data in the database directly from this same page. How can I achieve this?. i.e is it possible to, say, have a form on a section of this same web page that would allow me to directly manipulate/modify and update the database? (If you may give code, you may use abstract names for the database, tables and column and/or field names-I will understand). Many thanks in advance.

Yes, what you want to do is possible - and is one of the main points behind ASP.NET. You need to read some of the many free tutorials that are available. It's not the sort of thing anyone can describe in useful detail in a reply to a post in this forum. Here are a couple:

http://msconline.maconstate.edu/tutorials/ASPNET20/default.htm
http://quickstarts.asp.net/QuickStartv20/aspnet/doc/data/default.aspx

|||

The links above are useful in this regard. The question I have is a bit different. I have arleady written the code to manipulate the database using GridView control. This ofcourse works in conjunction with the SqlDataSource control. The SqlDataSource control permits selecting a single database table at a time for actions of delete, add, edit etc. This means that if I need to do the above actions on many tables, I will need to reconfigure the SqlDataSource for each table. This also means that I will be able to delete, add, update data in all tables by using a number of web pages as each each table manipulation will have to be done via a seperate web page. This is ok but is very usable. I want to put,say, a form on just one web page and then this form will allow me to perform actions of add, delete, update etc on all tables using just this page. In brief: How can I fit a form on the existing web page and use this form to add, delete, udate the entire database data?.

|||The SqlDataSource will take any valid SQL or the name of a stored procedure for its CommandText property. You can assign this value at runtime in the code-behind. Most applications of the type you are describing tend to not show one "table" at a time - they show data from related tables using joins. Each data maintenance task usually has its own page/form, so adding/editing/deleting a story, for example would all be managed from one page, whereas adding/editing/deleting a contact would be done on a different one. You could do it all in one page, but I would never do so. Maintenance of code would be a mightmare.

Sunday, March 11, 2012

Database Diagrams - SQL Server 2005 Express

I have installed Visual Basic 2005 Express and SQL server 2005 Express.

I am reading the ebook: "Microsoft Visual Basic 2005 Express Edition - Build a Program Now" that you download when you register the products (it is a PDF file named 6-2213-2.pdf)

Page 139 of the book (or 151 in the file) is about "To Create Relationships between Tables". So I follow the instruction and get stuck on Step 1. When I right click on the Database Diagrams folder under CarTracker.mdf database and choose Add New Diagram I get the following message:
Microsoft Visual Basic 2005 Express Edition

This database does not have a valid dbo user or you do not have permissions to impersonate the dbo user, so database diagramming is not available. Do you want to make yourself the dbo of this database in order to use database diagramming?

Yes No Help
So I click Yes and get the following error


Microsoft Visual Basic 2005 Express Edition

This database does not have a valid dbo user or you do not have permissions to impersonate the dbo user, so database diagramming is not available. Ensure the dbo account is valid and ensure you have impersonate permission on the dbo account.

OK Help
I am logged in with an account that is a Domain Admin whilst the laptop is not connected to the network. However, I believe this account is like a Local Administraor (from my NT4 days). In other words, I believe it has all the permissions etc. - I don't know what dbo is. I assume it is Database Owner and if it is, well I created the database.

Any guidance would be greatly appreciated ...

Having the same problem here (WXP SP2, Visual SQL Server Express and Visual C# Express). Anyone care to help us out?

Kind regards,

Maurits

Edited to add:

I too am working on a laptop. I'm at home, so I'm not connected to the university network domain but the user account I'm logged in with is indeed an administrator

|||

Here is one more. Just installed Visual Basic 2005 Express Edition on a XP SP2 laptop. Trying to do exercise on page 139 in the "Build a Program Now" book, about creating relationsship between tables.

"This database does not have a valid dbo user or you do not have permissions to impersonate the dbo user, so database diagramming is not avaliable. Do you want to make yourself the dbo of this database in order to use database diagraming?"

I then hit the <Yes> button

"This database does not have a valid dbo user or you do not have permissions to impersonate the dbo user, so database diagramming is not avaliable. Ensure the dbo account is valid and ensure you have impersonate permission on the dbo account."

<OK>

I'm now back to the start again. Shall I create a dbo user account or what?

|||

Here is one more. Just installed Visual Basic 2005 Express Edition on a XP SP2 laptop.

I have the same problem

BR

Alan

|||I had the same problem. My laptop is joined to a domain, and I was working offline. As soon as I connected back to my domain with VPN it starter working again.|||

Brian

Well done. I checked it now that I'm connected to a network domain and I no longer get the error. The diagrams seem to work fine.

Thank you

John

|||

I am also in a domain, but I am connected and still have the problem.

Does this have anything to do with the service account being used? Where can I change the dbo account with SQLExpress?

|||

Regarding service accounts, looking at the service SQL Server (SQLEXPRESS), the Log On tab has:

This account: NT AUTHORITY\NetworkService

[which I never setup or assigned passwords to.]

And looking at the service SQL Server VSS Writer, the Log On tab has:

Local System Account

Please check you have the same settings.

Sorry, I'm not sure if or where you can change dbo account for SQL Express.

|||

I have those same accounts.

I guess the bottom line is...How can I get my account to have impersonate permissions on the dbo account?

Tony Ansley

|||I recently experienced this same problem with the database not having a valid dbo user and being unable to add Database diagrams.

I came to this thread via google and found it to be actually little help since my computer is a stand-alone computer not even connected to the Internet. I am using it for developing the next 'killer app' :)

Anyway - A database connection worked for a while, then it stopped working.

After much fiddling and attempting to recall what I might have broken in the mean time, I realized that between the time that I installed SQL Server Express 2005 and now, I had changed the name of the computer!

I attempted to go into the SQL Server Configuration Tool but couldn't access the server name. Anyway - when I changed the computer name back to the name it had when I did the installation, Everything worked as before - I was able to connect to the databases, create diagrams, and everything!

I hope this helps some of the others of you that are experiencing difficulties.

JosBoy|||

Hi,

I want to give you a little point, to help.

If you create a new Database.mdf you see in the properties one point called "owner". In my case the "owner" was "SHAKIRA\Administrator".

My Computername was HNPC1 and I was logged in (Windows, If you boot your Computer) with this name ("HNPC1\Administrator").

I changed the Computername to SHAKIRA and logged in with this (SHAKIRA\Administrator), and now it was possible to create Diagramms.

God luck

|||I am having the same problem but the solutions posted don't seem to help. Are there step-by-step instructions available|||

The problem is to set up the proper database owner. You should:

-download the free tool from Microsoft site: SQL Server Management Studio Express CTP and install it.

-close the connection to the database (I`m using C# Express Edition, using VB.Net is probably quite the same doing that)

-open the new installed SQL tool

-under "Object Explorer" right click on Databases-"attach"

-find the *.mdf-file and add it

-right click on the new attached database, Properties, "Files", be sure to chose your account as the database owner

-connect to the database using C# Express or what ever

-chose the windows security

that is it.

|||

Thanx AndyWawa,

It pays to go read all the thread before attempting to fix a pro. Your solution was the only one that worked for me

|||

OK, I did that, no change, now what?

My path to this problem was through learning asp.net using the Sussman-Homer book from Wrox. I followed the book through building the db and adding database diagrams and everything worked just fine. Now, trying to teach a little asp in an advanced VB class, it fails (most embarassing for a teacher). The only difference between then and now is adding AJAX. My students (no AJAX) can add database diagrams to their copies.

I downloaded sql server management, installed it, and ran it on my laptop iaw the instructions above only to have the "You do not have permission to impersonate..." messagebox show up as has become maddeningly usual.

Next?

Database Diagrams - SQL Server 2005 Express

I have installed Visual Basic 2005 Express and SQL server 2005 Express.

I am reading the ebook: "Microsoft Visual Basic 2005 Express Edition - Build a Program Now" that you download when you register the products (it is a PDF file named 6-2213-2.pdf)

Page 139 of the book (or 151 in the file) is about "To Create Relationships between Tables". So I follow the instruction and get stuck on Step 1. When I right click on the Database Diagrams folder under CarTracker.mdf database and choose Add New Diagram I get the following message:
Microsoft Visual Basic 2005 Express Edition

This database does not have a valid dbo user or you do not have permissions to impersonate the dbo user, so database diagramming is not available. Do you want to make yourself the dbo of this database in order to use database diagramming?

Yes No Help
So I click Yes and get the following error


Microsoft Visual Basic 2005 Express Edition

This database does not have a valid dbo user or you do not have permissions to impersonate the dbo user, so database diagramming is not available. Ensure the dbo account is valid and ensure you have impersonate permission on the dbo account.

OK Help
I am logged in with an account that is a Domain Admin whilst the laptop is not connected to the network. However, I believe this account is like a Local Administraor (from my NT4 days). In other words, I believe it has all the permissions etc. - I don't know what dbo is. I assume it is Database Owner and if it is, well I created the database.

Any guidance would be greatly appreciated ...

Having the same problem here (WXP SP2, Visual SQL Server Express and Visual C# Express). Anyone care to help us out?

Kind regards,

Maurits

Edited to add:

I too am working on a laptop. I'm at home, so I'm not connected to the university network domain but the user account I'm logged in with is indeed an administrator

|||

Here is one more. Just installed Visual Basic 2005 Express Edition on a XP SP2 laptop. Trying to do exercise on page 139 in the "Build a Program Now" book, about creating relationsship between tables.

"This database does not have a valid dbo user or you do not have permissions to impersonate the dbo user, so database diagramming is not avaliable. Do you want to make yourself the dbo of this database in order to use database diagraming?"

I then hit the <Yes> button

"This database does not have a valid dbo user or you do not have permissions to impersonate the dbo user, so database diagramming is not avaliable. Ensure the dbo account is valid and ensure you have impersonate permission on the dbo account."

<OK>

I'm now back to the start again. Shall I create a dbo user account or what?

|||

Here is one more. Just installed Visual Basic 2005 Express Edition on a XP SP2 laptop.

I have the same problem

BR

Alan

|||I had the same problem. My laptop is joined to a domain, and I was working offline. As soon as I connected back to my domain with VPN it starter working again.|||

Brian

Well done. I checked it now that I'm connected to a network domain and I no longer get the error. The diagrams seem to work fine.

Thank you

John

|||

I am also in a domain, but I am connected and still have the problem.

Does this have anything to do with the service account being used? Where can I change the dbo account with SQLExpress?

|||

Regarding service accounts, looking at the service SQL Server (SQLEXPRESS), the Log On tab has:

This account: NT AUTHORITY\NetworkService

[which I never setup or assigned passwords to.]

And looking at the service SQL Server VSS Writer, the Log On tab has:

Local System Account

Please check you have the same settings.

Sorry, I'm not sure if or where you can change dbo account for SQL Express.

|||

I have those same accounts.

I guess the bottom line is...How can I get my account to have impersonate permissions on the dbo account?

Tony Ansley

|||I recently experienced this same problem with the database not having a valid dbo user and being unable to add Database diagrams.

I came to this thread via google and found it to be actually little help since my computer is a stand-alone computer not even connected to the Internet. I am using it for developing the next 'killer app' :)

Anyway - A database connection worked for a while, then it stopped working.

After much fiddling and attempting to recall what I might have broken in the mean time, I realized that between the time that I installed SQL Server Express 2005 and now, I had changed the name of the computer!

I attempted to go into the SQL Server Configuration Tool but couldn't access the server name. Anyway - when I changed the computer name back to the name it had when I did the installation, Everything worked as before - I was able to connect to the databases, create diagrams, and everything!

I hope this helps some of the others of you that are experiencing difficulties.

JosBoy|||

Hi,

I want to give you a little point, to help.

If you create a new Database.mdf you see in the properties one point called "owner". In my case the "owner" was "SHAKIRA\Administrator".

My Computername was HNPC1 and I was logged in (Windows, If you boot your Computer) with this name ("HNPC1\Administrator").

I changed the Computername to SHAKIRA and logged in with this (SHAKIRA\Administrator), and now it was possible to create Diagramms.

God luck

|||I am having the same problem but the solutions posted don't seem to help. Are there step-by-step instructions available|||

The problem is to set up the proper database owner. You should:

-download the free tool from Microsoft site: SQL Server Management Studio Express CTP and install it.

-close the connection to the database (I`m using C# Express Edition, using VB.Net is probably quite the same doing that)

-open the new installed SQL tool

-under "Object Explorer" right click on Databases-"attach"

-find the *.mdf-file and add it

-right click on the new attached database, Properties, "Files", be sure to chose your account as the database owner

-connect to the database using C# Express or what ever

-chose the windows security

that is it.

|||

Thanx AndyWawa,

It pays to go read all the thread before attempting to fix a pro. Your solution was the only one that worked for me

|||

OK, I did that, no change, now what?

My path to this problem was through learning asp.net using the Sussman-Homer book from Wrox. I followed the book through building the db and adding database diagrams and everything worked just fine. Now, trying to teach a little asp in an advanced VB class, it fails (most embarassing for a teacher). The only difference between then and now is adding AJAX. My students (no AJAX) can add database diagrams to their copies.

I downloaded sql server management, installed it, and ran it on my laptop iaw the instructions above only to have the "You do not have permission to impersonate..." messagebox show up as has become maddeningly usual.

Next?

Database Diagrams - SQL Server 2005 Express

I have installed Visual Basic 2005 Express and SQL server 2005 Express.

I am reading the ebook: "Microsoft Visual Basic 2005 Express Edition - Build a Program Now" that you download when you register the products (it is a PDF file named 6-2213-2.pdf)

Page 139 of the book (or 151 in the file) is about "To Create Relationships between Tables". So I follow the instruction and get stuck on Step 1. When I right click on the Database Diagrams folder under CarTracker.mdf database and choose Add New Diagram I get the following message:
Microsoft Visual Basic 2005 Express Edition

This database does not have a valid dbo user or you do not have permissions to impersonate the dbo user, so database diagramming is not available. Do you want to make yourself the dbo of this database in order to use database diagramming?

Yes No Help
So I click Yes and get the following error


Microsoft Visual Basic 2005 Express Edition

This database does not have a valid dbo user or you do not have permissions to impersonate the dbo user, so database diagramming is not available. Ensure the dbo account is valid and ensure you have impersonate permission on the dbo account.

OK Help
I am logged in with an account that is a Domain Admin whilst the laptop is not connected to the network. However, I believe this account is like a Local Administraor (from my NT4 days). In other words, I believe it has all the permissions etc. - I don't know what dbo is. I assume it is Database Owner and if it is, well I created the database.

Any guidance would be greatly appreciated ...

Having the same problem here (WXP SP2, Visual SQL Server Express and Visual C# Express). Anyone care to help us out?

Kind regards,

Maurits

Edited to add:

I too am working on a laptop. I'm at home, so I'm not connected to the university network domain but the user account I'm logged in with is indeed an administrator

|||

Here is one more. Just installed Visual Basic 2005 Express Edition on a XP SP2 laptop. Trying to do exercise on page 139 in the "Build a Program Now" book, about creating relationsship between tables.

"This database does not have a valid dbo user or you do not have permissions to impersonate the dbo user, so database diagramming is not avaliable. Do you want to make yourself the dbo of this database in order to use database diagraming?"

I then hit the <Yes> button

"This database does not have a valid dbo user or you do not have permissions to impersonate the dbo user, so database diagramming is not avaliable. Ensure the dbo account is valid and ensure you have impersonate permission on the dbo account."

<OK>

I'm now back to the start again. Shall I create a dbo user account or what?

|||

Here is one more. Just installed Visual Basic 2005 Express Edition on a XP SP2 laptop.

I have the same problem

BR

Alan

|||I had the same problem. My laptop is joined to a domain, and I was working offline. As soon as I connected back to my domain with VPN it starter working again.|||

Brian

Well done. I checked it now that I'm connected to a network domain and I no longer get the error. The diagrams seem to work fine.

Thank you

John

|||

I am also in a domain, but I am connected and still have the problem.

Does this have anything to do with the service account being used? Where can I change the dbo account with SQLExpress?

|||

Regarding service accounts, looking at the service SQL Server (SQLEXPRESS), the Log On tab has:

This account: NT AUTHORITY\NetworkService

[which I never setup or assigned passwords to.]

And looking at the service SQL Server VSS Writer, the Log On tab has:

Local System Account

Please check you have the same settings.

Sorry, I'm not sure if or where you can change dbo account for SQL Express.

|||

I have those same accounts.

I guess the bottom line is...How can I get my account to have impersonate permissions on the dbo account?

Tony Ansley

|||I recently experienced this same problem with the database not having a valid dbo user and being unable to add Database diagrams.

I came to this thread via google and found it to be actually little help since my computer is a stand-alone computer not even connected to the Internet. I am using it for developing the next 'killer app' :)

Anyway - A database connection worked for a while, then it stopped working.

After much fiddling and attempting to recall what I might have broken in the mean time, I realized that between the time that I installed SQL Server Express 2005 and now, I had changed the name of the computer!

I attempted to go into the SQL Server Configuration Tool but couldn't access the server name. Anyway - when I changed the computer name back to the name it had when I did the installation, Everything worked as before - I was able to connect to the databases, create diagrams, and everything!

I hope this helps some of the others of you that are experiencing difficulties.

JosBoy
|||

Hi,

I want to give you a little point, to help.

If you create a new Database.mdf you see in the properties one point called "owner". In my case the "owner" was "SHAKIRA\Administrator".

My Computername was HNPC1 and I was logged in (Windows, If you boot your Computer) with this name ("HNPC1\Administrator").

I changed the Computername to SHAKIRA and logged in with this (SHAKIRA\Administrator), and now it was possible to create Diagramms.

God luck

|||I am having the same problem but the solutions posted don't seem to help. Are there step-by-step instructions available|||

The problem is to set up the proper database owner. You should:

-download the free tool from Microsoft site: SQL Server Management Studio Express CTP and install it.

-close the connection to the database (I`m using C# Express Edition, using VB.Net is probably quite the same doing that)

-open the new installed SQL tool

-under "Object Explorer" right click on Databases-"attach"

-find the *.mdf-file and add it

-right click on the new attached database, Properties, "Files", be sure to chose your account as the database owner

-connect to the database using C# Express or what ever

-chose the windows security

that is it.

|||

Thanx AndyWawa,

It pays to go read all the thread before attempting to fix a pro. Your solution was the only one that worked for me

|||

OK, I did that, no change, now what?

My path to this problem was through learning asp.net using the Sussman-Homer book from Wrox. I followed the book through building the db and adding database diagrams and everything worked just fine. Now, trying to teach a little asp in an advanced VB class, it fails (most embarassing for a teacher). The only difference between then and now is adding AJAX. My students (no AJAX) can add database diagrams to their copies.

I downloaded sql server management, installed it, and ran it on my laptop iaw the instructions above only to have the "You do not have permission to impersonate..." messagebox show up as has become maddeningly usual.

Next?

Database Diagrams - SQL Server 2005 Express

I have installed Visual Basic 2005 Express and SQL server 2005 Express.

I am reading the ebook: "Microsoft Visual Basic 2005 Express Edition - Build a Program Now" that you download when you register the products (it is a PDF file named 6-2213-2.pdf)

Page 139 of the book (or 151 in the file) is about "To Create Relationships between Tables". So I follow the instruction and get stuck on Step 1. When I right click on the Database Diagrams folder under CarTracker.mdf database and choose Add New Diagram I get the following message:
Microsoft Visual Basic 2005 Express Edition

This database does not have a valid dbo user or you do not have permissions to impersonate the dbo user, so database diagramming is not available. Do you want to make yourself the dbo of this database in order to use database diagramming?

Yes No Help
So I click Yes and get the following error


Microsoft Visual Basic 2005 Express Edition

This database does not have a valid dbo user or you do not have permissions to impersonate the dbo user, so database diagramming is not available. Ensure the dbo account is valid and ensure you have impersonate permission on the dbo account.

OK Help
I am logged in with an account that is a Domain Admin whilst the laptop is not connected to the network. However, I believe this account is like a Local Administraor (from my NT4 days). In other words, I believe it has all the permissions etc. - I don't know what dbo is. I assume it is Database Owner and if it is, well I created the database.

Any guidance would be greatly appreciated ...

Having the same problem here (WXP SP2, Visual SQL Server Express and Visual C# Express). Anyone care to help us out?

Kind regards,

Maurits

Edited to add:

I too am working on a laptop. I'm at home, so I'm not connected to the university network domain but the user account I'm logged in with is indeed an administrator

|||

Here is one more. Just installed Visual Basic 2005 Express Edition on a XP SP2 laptop. Trying to do exercise on page 139 in the "Build a Program Now" book, about creating relationsship between tables.

"This database does not have a valid dbo user or you do not have permissions to impersonate the dbo user, so database diagramming is not avaliable. Do you want to make yourself the dbo of this database in order to use database diagraming?"

I then hit the <Yes> button

"This database does not have a valid dbo user or you do not have permissions to impersonate the dbo user, so database diagramming is not avaliable. Ensure the dbo account is valid and ensure you have impersonate permission on the dbo account."

<OK>

I'm now back to the start again. Shall I create a dbo user account or what?

|||

Here is one more. Just installed Visual Basic 2005 Express Edition on a XP SP2 laptop.

I have the same problem

BR

Alan

|||I had the same problem. My laptop is joined to a domain, and I was working offline. As soon as I connected back to my domain with VPN it starter working again.|||

Brian

Well done. I checked it now that I'm connected to a network domain and I no longer get the error. The diagrams seem to work fine.

Thank you

John

|||

I am also in a domain, but I am connected and still have the problem.

Does this have anything to do with the service account being used? Where can I change the dbo account with SQLExpress?

|||

Regarding service accounts, looking at the service SQL Server (SQLEXPRESS), the Log On tab has:

This account: NT AUTHORITY\NetworkService

[which I never setup or assigned passwords to.]

And looking at the service SQL Server VSS Writer, the Log On tab has:

Local System Account

Please check you have the same settings.

Sorry, I'm not sure if or where you can change dbo account for SQL Express.

|||

I have those same accounts.

I guess the bottom line is...How can I get my account to have impersonate permissions on the dbo account?

Tony Ansley

|||I recently experienced this same problem with the database not having a valid dbo user and being unable to add Database diagrams.

I came to this thread via google and found it to be actually little help since my computer is a stand-alone computer not even connected to the Internet. I am using it for developing the next 'killer app' :)

Anyway - A database connection worked for a while, then it stopped working.

After much fiddling and attempting to recall what I might have broken in the mean time, I realized that between the time that I installed SQL Server Express 2005 and now, I had changed the name of the computer!

I attempted to go into the SQL Server Configuration Tool but couldn't access the server name. Anyway - when I changed the computer name back to the name it had when I did the installation, Everything worked as before - I was able to connect to the databases, create diagrams, and everything!

I hope this helps some of the others of you that are experiencing difficulties.

JosBoy
|||

Hi,

I want to give you a little point, to help.

If you create a new Database.mdf you see in the properties one point called "owner". In my case the "owner" was "SHAKIRA\Administrator".

My Computername was HNPC1 and I was logged in (Windows, If you boot your Computer) with this name ("HNPC1\Administrator").

I changed the Computername to SHAKIRA and logged in with this (SHAKIRA\Administrator), and now it was possible to create Diagramms.

God luck

|||I am having the same problem but the solutions posted don't seem to help. Are there step-by-step instructions available|||

The problem is to set up the proper database owner. You should:

-download the free tool from Microsoft site: SQL Server Management Studio Express CTP and install it.

-close the connection to the database (I`m using C# Express Edition, using VB.Net is probably quite the same doing that)

-open the new installed SQL tool

-under "Object Explorer" right click on Databases-"attach"

-find the *.mdf-file and add it

-right click on the new attached database, Properties, "Files", be sure to chose your account as the database owner

-connect to the database using C# Express or what ever

-chose the windows security

that is it.

|||

Thanx AndyWawa,

It pays to go read all the thread before attempting to fix a pro. Your solution was the only one that worked for me

|||

OK, I did that, no change, now what?

My path to this problem was through learning asp.net using the Sussman-Homer book from Wrox. I followed the book through building the db and adding database diagrams and everything worked just fine. Now, trying to teach a little asp in an advanced VB class, it fails (most embarassing for a teacher). The only difference between then and now is adding AJAX. My students (no AJAX) can add database diagrams to their copies.

I downloaded sql server management, installed it, and ran it on my laptop iaw the instructions above only to have the "You do not have permission to impersonate..." messagebox show up as has become maddeningly usual.

Next?

Database Diagrams - SQL Server 2005 Express

I have installed Visual Basic 2005 Express and SQL server 2005 Express.

I am reading the ebook: "Microsoft Visual Basic 2005 Express Edition - Build a Program Now" that you download when you register the products (it is a PDF file named 6-2213-2.pdf)

Page 139 of the book (or 151 in the file) is about "To Create Relationships between Tables". So I follow the instruction and get stuck on Step 1. When I right click on the Database Diagrams folder under CarTracker.mdf database and choose Add New Diagram I get the following message:
Microsoft Visual Basic 2005 Express Edition

This database does not have a valid dbo user or you do not have permissions to impersonate the dbo user, so database diagramming is not available. Do you want to make yourself the dbo of this database in order to use database diagramming?

Yes No Help
So I click Yes and get the following error


Microsoft Visual Basic 2005 Express Edition

This database does not have a valid dbo user or you do not have permissions to impersonate the dbo user, so database diagramming is not available. Ensure the dbo account is valid and ensure you have impersonate permission on the dbo account.

OK Help
I am logged in with an account that is a Domain Admin whilst the laptop is not connected to the network. However, I believe this account is like a Local Administraor (from my NT4 days). In other words, I believe it has all the permissions etc. - I don't know what dbo is. I assume it is Database Owner and if it is, well I created the database.

Any guidance would be greatly appreciated ...

Having the same problem here (WXP SP2, Visual SQL Server Express and Visual C# Express). Anyone care to help us out?

Kind regards,

Maurits

Edited to add:

I too am working on a laptop. I'm at home, so I'm not connected to the university network domain but the user account I'm logged in with is indeed an administrator

|||

Here is one more. Just installed Visual Basic 2005 Express Edition on a XP SP2 laptop. Trying to do exercise on page 139 in the "Build a Program Now" book, about creating relationsship between tables.

"This database does not have a valid dbo user or you do not have permissions to impersonate the dbo user, so database diagramming is not avaliable. Do you want to make yourself the dbo of this database in order to use database diagraming?"

I then hit the <Yes> button

"This database does not have a valid dbo user or you do not have permissions to impersonate the dbo user, so database diagramming is not avaliable. Ensure the dbo account is valid and ensure you have impersonate permission on the dbo account."

<OK>

I'm now back to the start again. Shall I create a dbo user account or what?

|||

Here is one more. Just installed Visual Basic 2005 Express Edition on a XP SP2 laptop.

I have the same problem

BR

Alan

|||I had the same problem. My laptop is joined to a domain, and I was working offline. As soon as I connected back to my domain with VPN it starter working again.|||

Brian

Well done. I checked it now that I'm connected to a network domain and I no longer get the error. The diagrams seem to work fine.

Thank you

John

|||

I am also in a domain, but I am connected and still have the problem.

Does this have anything to do with the service account being used? Where can I change the dbo account with SQLExpress?

|||

Regarding service accounts, looking at the service SQL Server (SQLEXPRESS), the Log On tab has:

This account: NT AUTHORITY\NetworkService

[which I never setup or assigned passwords to.]

And looking at the service SQL Server VSS Writer, the Log On tab has:

Local System Account

Please check you have the same settings.

Sorry, I'm not sure if or where you can change dbo account for SQL Express.

|||

I have those same accounts.

I guess the bottom line is...How can I get my account to have impersonate permissions on the dbo account?

Tony Ansley

|||I recently experienced this same problem with the database not having a valid dbo user and being unable to add Database diagrams.

I came to this thread via google and found it to be actually little help since my computer is a stand-alone computer not even connected to the Internet. I am using it for developing the next 'killer app' :)

Anyway - A database connection worked for a while, then it stopped working.

After much fiddling and attempting to recall what I might have broken in the mean time, I realized that between the time that I installed SQL Server Express 2005 and now, I had changed the name of the computer!

I attempted to go into the SQL Server Configuration Tool but couldn't access the server name. Anyway - when I changed the computer name back to the name it had when I did the installation, Everything worked as before - I was able to connect to the databases, create diagrams, and everything!

I hope this helps some of the others of you that are experiencing difficulties.

JosBoy
|||

Hi,

I want to give you a little point, to help.

If you create a new Database.mdf you see in the properties one point called "owner". In my case the "owner" was "SHAKIRA\Administrator".

My Computername was HNPC1 and I was logged in (Windows, If you boot your Computer) with this name ("HNPC1\Administrator").

I changed the Computername to SHAKIRA and logged in with this (SHAKIRA\Administrator), and now it was possible to create Diagramms.

God luck

|||I am having the same problem but the solutions posted don't seem to help. Are there step-by-step instructions available|||

The problem is to set up the proper database owner. You should:

-download the free tool from Microsoft site: SQL Server Management Studio Express CTP and install it.

-close the connection to the database (I`m using C# Express Edition, using VB.Net is probably quite the same doing that)

-open the new installed SQL tool

-under "Object Explorer" right click on Databases-"attach"

-find the *.mdf-file and add it

-right click on the new attached database, Properties, "Files", be sure to chose your account as the database owner

-connect to the database using C# Express or what ever

-chose the windows security

that is it.

|||

Thanx AndyWawa,

It pays to go read all the thread before attempting to fix a pro. Your solution was the only one that worked for me

|||

OK, I did that, no change, now what?

My path to this problem was through learning asp.net using the Sussman-Homer book from Wrox. I followed the book through building the db and adding database diagrams and everything worked just fine. Now, trying to teach a little asp in an advanced VB class, it fails (most embarassing for a teacher). The only difference between then and now is adding AJAX. My students (no AJAX) can add database diagrams to their copies.

I downloaded sql server management, installed it, and ran it on my laptop iaw the instructions above only to have the "You do not have permission to impersonate..." messagebox show up as has become maddeningly usual.

Next?

Database Diagrams - SQL Server 2005 Express

I have installed Visual Basic 2005 Express and SQL server 2005 Express.

I am reading the ebook: "Microsoft Visual Basic 2005 Express Edition - Build a Program Now" that you download when you register the products (it is a PDF file named 6-2213-2.pdf)

Page 139 of the book (or 151 in the file) is about "To Create Relationships between Tables". So I follow the instruction and get stuck on Step 1. When I right click on the Database Diagrams folder under CarTracker.mdf database and choose Add New Diagram I get the following message:
Microsoft Visual Basic 2005 Express Edition

This database does not have a valid dbo user or you do not have permissions to impersonate the dbo user, so database diagramming is not available. Do you want to make yourself the dbo of this database in order to use database diagramming?

Yes No Help
So I click Yes and get the following error


Microsoft Visual Basic 2005 Express Edition

This database does not have a valid dbo user or you do not have permissions to impersonate the dbo user, so database diagramming is not available. Ensure the dbo account is valid and ensure you have impersonate permission on the dbo account.

OK Help
I am logged in with an account that is a Domain Admin whilst the laptop is not connected to the network. However, I believe this account is like a Local Administraor (from my NT4 days). In other words, I believe it has all the permissions etc. - I don't know what dbo is. I assume it is Database Owner and if it is, well I created the database.

Any guidance would be greatly appreciated ...

Having the same problem here (WXP SP2, Visual SQL Server Express and Visual C# Express). Anyone care to help us out?

Kind regards,

Maurits

Edited to add:

I too am working on a laptop. I'm at home, so I'm not connected to the university network domain but the user account I'm logged in with is indeed an administrator

|||

Here is one more. Just installed Visual Basic 2005 Express Edition on a XP SP2 laptop. Trying to do exercise on page 139 in the "Build a Program Now" book, about creating relationsship between tables.

"This database does not have a valid dbo user or you do not have permissions to impersonate the dbo user, so database diagramming is not avaliable. Do you want to make yourself the dbo of this database in order to use database diagraming?"

I then hit the <Yes> button

"This database does not have a valid dbo user or you do not have permissions to impersonate the dbo user, so database diagramming is not avaliable. Ensure the dbo account is valid and ensure you have impersonate permission on the dbo account."

<OK>

I'm now back to the start again. Shall I create a dbo user account or what?

|||

Here is one more. Just installed Visual Basic 2005 Express Edition on a XP SP2 laptop.

I have the same problem

BR

Alan

|||I had the same problem. My laptop is joined to a domain, and I was working offline. As soon as I connected back to my domain with VPN it starter working again.|||

Brian

Well done. I checked it now that I'm connected to a network domain and I no longer get the error. The diagrams seem to work fine.

Thank you

John

|||

I am also in a domain, but I am connected and still have the problem.

Does this have anything to do with the service account being used? Where can I change the dbo account with SQLExpress?

|||

Regarding service accounts, looking at the service SQL Server (SQLEXPRESS), the Log On tab has:

This account: NT AUTHORITY\NetworkService

[which I never setup or assigned passwords to.]

And looking at the service SQL Server VSS Writer, the Log On tab has:

Local System Account

Please check you have the same settings.

Sorry, I'm not sure if or where you can change dbo account for SQL Express.

|||

I have those same accounts.

I guess the bottom line is...How can I get my account to have impersonate permissions on the dbo account?

Tony Ansley

|||I recently experienced this same problem with the database not having a valid dbo user and being unable to add Database diagrams.

I came to this thread via google and found it to be actually little help since my computer is a stand-alone computer not even connected to the Internet. I am using it for developing the next 'killer app' :)

Anyway - A database connection worked for a while, then it stopped working.

After much fiddling and attempting to recall what I might have broken in the mean time, I realized that between the time that I installed SQL Server Express 2005 and now, I had changed the name of the computer!

I attempted to go into the SQL Server Configuration Tool but couldn't access the server name. Anyway - when I changed the computer name back to the name it had when I did the installation, Everything worked as before - I was able to connect to the databases, create diagrams, and everything!

I hope this helps some of the others of you that are experiencing difficulties.

JosBoy|||

Hi,

I want to give you a little point, to help.

If you create a new Database.mdf you see in the properties one point called "owner". In my case the "owner" was "SHAKIRA\Administrator".

My Computername was HNPC1 and I was logged in (Windows, If you boot your Computer) with this name ("HNPC1\Administrator").

I changed the Computername to SHAKIRA and logged in with this (SHAKIRA\Administrator), and now it was possible to create Diagramms.

God luck

|||I am having the same problem but the solutions posted don't seem to help. Are there step-by-step instructions available|||

The problem is to set up the proper database owner. You should:

-download the free tool from Microsoft site: SQL Server Management Studio Express CTP and install it.

-close the connection to the database (I`m using C# Express Edition, using VB.Net is probably quite the same doing that)

-open the new installed SQL tool

-under "Object Explorer" right click on Databases-"attach"

-find the *.mdf-file and add it

-right click on the new attached database, Properties, "Files", be sure to chose your account as the database owner

-connect to the database using C# Express or what ever

-chose the windows security

that is it.

|||

Thanx AndyWawa,

It pays to go read all the thread before attempting to fix a pro. Your solution was the only one that worked for me

|||

OK, I did that, no change, now what?

My path to this problem was through learning asp.net using the Sussman-Homer book from Wrox. I followed the book through building the db and adding database diagrams and everything worked just fine. Now, trying to teach a little asp in an advanced VB class, it fails (most embarassing for a teacher). The only difference between then and now is adding AJAX. My students (no AJAX) can add database diagrams to their copies.

I downloaded sql server management, installed it, and ran it on my laptop iaw the instructions above only to have the "You do not have permission to impersonate..." messagebox show up as has become maddeningly usual.

Next?

Database Diagrams - SQL Server 2005 Express

I have installed Visual Basic 2005 Express and SQL server 2005 Express.

I am reading the ebook: "Microsoft Visual Basic 2005 Express Edition - Build a Program Now" that you download when you register the products (it is a PDF file named 6-2213-2.pdf)

Page 139 of the book (or 151 in the file) is about "To Create Relationships between Tables". So I follow the instruction and get stuck on Step 1. When I right click on the Database Diagrams folder under CarTracker.mdf database and choose Add New Diagram I get the following message:
Microsoft Visual Basic 2005 Express Edition

This database does not have a valid dbo user or you do not have permissions to impersonate the dbo user, so database diagramming is not available. Do you want to make yourself the dbo of this database in order to use database diagramming?

Yes No Help
So I click Yes and get the following error


Microsoft Visual Basic 2005 Express Edition

This database does not have a valid dbo user or you do not have permissions to impersonate the dbo user, so database diagramming is not available. Ensure the dbo account is valid and ensure you have impersonate permission on the dbo account.

OK Help
I am logged in with an account that is a Domain Admin whilst the laptop is not connected to the network. However, I believe this account is like a Local Administraor (from my NT4 days). In other words, I believe it has all the permissions etc. - I don't know what dbo is. I assume it is Database Owner and if it is, well I created the database.

Any guidance would be greatly appreciated ...

Having the same problem here (WXP SP2, Visual SQL Server Express and Visual C# Express). Anyone care to help us out?

Kind regards,

Maurits

Edited to add:

I too am working on a laptop. I'm at home, so I'm not connected to the university network domain but the user account I'm logged in with is indeed an administrator

|||

Here is one more. Just installed Visual Basic 2005 Express Edition on a XP SP2 laptop. Trying to do exercise on page 139 in the "Build a Program Now" book, about creating relationsship between tables.

"This database does not have a valid dbo user or you do not have permissions to impersonate the dbo user, so database diagramming is not avaliable. Do you want to make yourself the dbo of this database in order to use database diagraming?"

I then hit the <Yes> button

"This database does not have a valid dbo user or you do not have permissions to impersonate the dbo user, so database diagramming is not avaliable. Ensure the dbo account is valid and ensure you have impersonate permission on the dbo account."

<OK>

I'm now back to the start again. Shall I create a dbo user account or what?

|||

Here is one more. Just installed Visual Basic 2005 Express Edition on a XP SP2 laptop.

I have the same problem

BR

Alan

|||I had the same problem. My laptop is joined to a domain, and I was working offline. As soon as I connected back to my domain with VPN it starter working again.|||

Brian

Well done. I checked it now that I'm connected to a network domain and I no longer get the error. The diagrams seem to work fine.

Thank you

John

|||

I am also in a domain, but I am connected and still have the problem.

Does this have anything to do with the service account being used? Where can I change the dbo account with SQLExpress?

|||

Regarding service accounts, looking at the service SQL Server (SQLEXPRESS), the Log On tab has:

This account: NT AUTHORITY\NetworkService

[which I never setup or assigned passwords to.]

And looking at the service SQL Server VSS Writer, the Log On tab has:

Local System Account

Please check you have the same settings.

Sorry, I'm not sure if or where you can change dbo account for SQL Express.

|||

I have those same accounts.

I guess the bottom line is...How can I get my account to have impersonate permissions on the dbo account?

Tony Ansley

|||I recently experienced this same problem with the database not having a valid dbo user and being unable to add Database diagrams.

I came to this thread via google and found it to be actually little help since my computer is a stand-alone computer not even connected to the Internet. I am using it for developing the next 'killer app' :)

Anyway - A database connection worked for a while, then it stopped working.

After much fiddling and attempting to recall what I might have broken in the mean time, I realized that between the time that I installed SQL Server Express 2005 and now, I had changed the name of the computer!

I attempted to go into the SQL Server Configuration Tool but couldn't access the server name. Anyway - when I changed the computer name back to the name it had when I did the installation, Everything worked as before - I was able to connect to the databases, create diagrams, and everything!

I hope this helps some of the others of you that are experiencing difficulties.

JosBoy|||

Hi,

I want to give you a little point, to help.

If you create a new Database.mdf you see in the properties one point called "owner". In my case the "owner" was "SHAKIRA\Administrator".

My Computername was HNPC1 and I was logged in (Windows, If you boot your Computer) with this name ("HNPC1\Administrator").

I changed the Computername to SHAKIRA and logged in with this (SHAKIRA\Administrator), and now it was possible to create Diagramms.

God luck

|||I am having the same problem but the solutions posted don't seem to help. Are there step-by-step instructions available|||

The problem is to set up the proper database owner. You should:

-download the free tool from Microsoft site: SQL Server Management Studio Express CTP and install it.

-close the connection to the database (I`m using C# Express Edition, using VB.Net is probably quite the same doing that)

-open the new installed SQL tool

-under "Object Explorer" right click on Databases-"attach"

-find the *.mdf-file and add it

-right click on the new attached database, Properties, "Files", be sure to chose your account as the database owner

-connect to the database using C# Express or what ever

-chose the windows security

that is it.

|||

Thanx AndyWawa,

It pays to go read all the thread before attempting to fix a pro. Your solution was the only one that worked for me

|||

OK, I did that, no change, now what?

My path to this problem was through learning asp.net using the Sussman-Homer book from Wrox. I followed the book through building the db and adding database diagrams and everything worked just fine. Now, trying to teach a little asp in an advanced VB class, it fails (most embarassing for a teacher). The only difference between then and now is adding AJAX. My students (no AJAX) can add database diagrams to their copies.

I downloaded sql server management, installed it, and ran it on my laptop iaw the instructions above only to have the "You do not have permission to impersonate..." messagebox show up as has become maddeningly usual.

Next?

Database Diagrams - SQL Server 2005 Express

I have installed Visual Basic 2005 Express and SQL server 2005 Express.

I am reading the ebook: "Microsoft Visual Basic 2005 Express Edition - Build a Program Now" that you download when you register the products (it is a PDF file named 6-2213-2.pdf)

Page 139 of the book (or 151 in the file) is about "To Create Relationships between Tables". So I follow the instruction and get stuck on Step 1. When I right click on the Database Diagrams folder under CarTracker.mdf database and choose Add New Diagram I get the following message:
Microsoft Visual Basic 2005 Express Edition

This database does not have a valid dbo user or you do not have permissions to impersonate the dbo user, so database diagramming is not available. Do you want to make yourself the dbo of this database in order to use database diagramming?

Yes No Help
So I click Yes and get the following error


Microsoft Visual Basic 2005 Express Edition

This database does not have a valid dbo user or you do not have permissions to impersonate the dbo user, so database diagramming is not available. Ensure the dbo account is valid and ensure you have impersonate permission on the dbo account.

OK Help
I am logged in with an account that is a Domain Admin whilst the laptop is not connected to the network. However, I believe this account is like a Local Administraor (from my NT4 days). In other words, I believe it has all the permissions etc. - I don't know what dbo is. I assume it is Database Owner and if it is, well I created the database.

Any guidance would be greatly appreciated ...

Having the same problem here (WXP SP2, Visual SQL Server Express and Visual C# Express). Anyone care to help us out?

Kind regards,

Maurits

Edited to add:

I too am working on a laptop. I'm at home, so I'm not connected to the university network domain but the user account I'm logged in with is indeed an administrator

|||

Here is one more. Just installed Visual Basic 2005 Express Edition on a XP SP2 laptop. Trying to do exercise on page 139 in the "Build a Program Now" book, about creating relationsship between tables.

"This database does not have a valid dbo user or you do not have permissions to impersonate the dbo user, so database diagramming is not avaliable. Do you want to make yourself the dbo of this database in order to use database diagraming?"

I then hit the <Yes> button

"This database does not have a valid dbo user or you do not have permissions to impersonate the dbo user, so database diagramming is not avaliable. Ensure the dbo account is valid and ensure you have impersonate permission on the dbo account."

<OK>

I'm now back to the start again. Shall I create a dbo user account or what?

|||

Here is one more. Just installed Visual Basic 2005 Express Edition on a XP SP2 laptop.

I have the same problem

BR

Alan

|||I had the same problem. My laptop is joined to a domain, and I was working offline. As soon as I connected back to my domain with VPN it starter working again.|||

Brian

Well done. I checked it now that I'm connected to a network domain and I no longer get the error. The diagrams seem to work fine.

Thank you

John

|||

I am also in a domain, but I am connected and still have the problem.

Does this have anything to do with the service account being used? Where can I change the dbo account with SQLExpress?

|||

Regarding service accounts, looking at the service SQL Server (SQLEXPRESS), the Log On tab has:

This account: NT AUTHORITY\NetworkService

[which I never setup or assigned passwords to.]

And looking at the service SQL Server VSS Writer, the Log On tab has:

Local System Account

Please check you have the same settings.

Sorry, I'm not sure if or where you can change dbo account for SQL Express.

|||

I have those same accounts.

I guess the bottom line is...How can I get my account to have impersonate permissions on the dbo account?

Tony Ansley

|||I recently experienced this same problem with the database not having a valid dbo user and being unable to add Database diagrams.

I came to this thread via google and found it to be actually little help since my computer is a stand-alone computer not even connected to the Internet. I am using it for developing the next 'killer app' :)

Anyway - A database connection worked for a while, then it stopped working.

After much fiddling and attempting to recall what I might have broken in the mean time, I realized that between the time that I installed SQL Server Express 2005 and now, I had changed the name of the computer!

I attempted to go into the SQL Server Configuration Tool but couldn't access the server name. Anyway - when I changed the computer name back to the name it had when I did the installation, Everything worked as before - I was able to connect to the databases, create diagrams, and everything!

I hope this helps some of the others of you that are experiencing difficulties.

JosBoy|||

Hi,

I want to give you a little point, to help.

If you create a new Database.mdf you see in the properties one point called "owner". In my case the "owner" was "SHAKIRA\Administrator".

My Computername was HNPC1 and I was logged in (Windows, If you boot your Computer) with this name ("HNPC1\Administrator").

I changed the Computername to SHAKIRA and logged in with this (SHAKIRA\Administrator), and now it was possible to create Diagramms.

God luck

|||I am having the same problem but the solutions posted don't seem to help. Are there step-by-step instructions available|||

The problem is to set up the proper database owner. You should:

-download the free tool from Microsoft site: SQL Server Management Studio Express CTP and install it.

-close the connection to the database (I`m using C# Express Edition, using VB.Net is probably quite the same doing that)

-open the new installed SQL tool

-under "Object Explorer" right click on Databases-"attach"

-find the *.mdf-file and add it

-right click on the new attached database, Properties, "Files", be sure to chose your account as the database owner

-connect to the database using C# Express or what ever

-chose the windows security

that is it.

|||

Thanx AndyWawa,

It pays to go read all the thread before attempting to fix a pro. Your solution was the only one that worked for me

|||

OK, I did that, no change, now what?

My path to this problem was through learning asp.net using the Sussman-Homer book from Wrox. I followed the book through building the db and adding database diagrams and everything worked just fine. Now, trying to teach a little asp in an advanced VB class, it fails (most embarassing for a teacher). The only difference between then and now is adding AJAX. My students (no AJAX) can add database diagrams to their copies.

I downloaded sql server management, installed it, and ran it on my laptop iaw the instructions above only to have the "You do not have permission to impersonate..." messagebox show up as has become maddeningly usual.

Next?

Database Diagrams - SQL Server 2005 Express

I have installed Visual Basic 2005 Express and SQL server 2005 Express.

I am reading the ebook: "Microsoft Visual Basic 2005 Express Edition - Build a Program Now" that you download when you register the products (it is a PDF file named 6-2213-2.pdf)

Page 139 of the book (or 151 in the file) is about "To Create Relationships between Tables". So I follow the instruction and get stuck on Step 1. When I right click on the Database Diagrams folder under CarTracker.mdf database and choose Add New Diagram I get the following message:
Microsoft Visual Basic 2005 Express Edition

This database does not have a valid dbo user or you do not have permissions to impersonate the dbo user, so database diagramming is not available. Do you want to make yourself the dbo of this database in order to use database diagramming?

Yes No Help
So I click Yes and get the following error


Microsoft Visual Basic 2005 Express Edition

This database does not have a valid dbo user or you do not have permissions to impersonate the dbo user, so database diagramming is not available. Ensure the dbo account is valid and ensure you have impersonate permission on the dbo account.

OK Help
I am logged in with an account that is a Domain Admin whilst the laptop is not connected to the network. However, I believe this account is like a Local Administraor (from my NT4 days). In other words, I believe it has all the permissions etc. - I don't know what dbo is. I assume it is Database Owner and if it is, well I created the database.

Any guidance would be greatly appreciated ...

Having the same problem here (WXP SP2, Visual SQL Server Express and Visual C# Express). Anyone care to help us out?

Kind regards,

Maurits

Edited to add:

I too am working on a laptop. I'm at home, so I'm not connected to the university network domain but the user account I'm logged in with is indeed an administrator

|||

Here is one more. Just installed Visual Basic 2005 Express Edition on a XP SP2 laptop. Trying to do exercise on page 139 in the "Build a Program Now" book, about creating relationsship between tables.

"This database does not have a valid dbo user or you do not have permissions to impersonate the dbo user, so database diagramming is not avaliable. Do you want to make yourself the dbo of this database in order to use database diagraming?"

I then hit the <Yes> button

"This database does not have a valid dbo user or you do not have permissions to impersonate the dbo user, so database diagramming is not avaliable. Ensure the dbo account is valid and ensure you have impersonate permission on the dbo account."

<OK>

I'm now back to the start again. Shall I create a dbo user account or what?

|||

Here is one more. Just installed Visual Basic 2005 Express Edition on a XP SP2 laptop.

I have the same problem

BR

Alan

|||I had the same problem. My laptop is joined to a domain, and I was working offline. As soon as I connected back to my domain with VPN it starter working again.|||

Brian

Well done. I checked it now that I'm connected to a network domain and I no longer get the error. The diagrams seem to work fine.

Thank you

John

|||

I am also in a domain, but I am connected and still have the problem.

Does this have anything to do with the service account being used? Where can I change the dbo account with SQLExpress?

|||

Regarding service accounts, looking at the service SQL Server (SQLEXPRESS), the Log On tab has:

This account: NT AUTHORITY\NetworkService

[which I never setup or assigned passwords to.]

And looking at the service SQL Server VSS Writer, the Log On tab has:

Local System Account

Please check you have the same settings.

Sorry, I'm not sure if or where you can change dbo account for SQL Express.

|||

I have those same accounts.

I guess the bottom line is...How can I get my account to have impersonate permissions on the dbo account?

Tony Ansley

|||I recently experienced this same problem with the database not having a valid dbo user and being unable to add Database diagrams.

I came to this thread via google and found it to be actually little help since my computer is a stand-alone computer not even connected to the Internet. I am using it for developing the next 'killer app' :)

Anyway - A database connection worked for a while, then it stopped working.

After much fiddling and attempting to recall what I might have broken in the mean time, I realized that between the time that I installed SQL Server Express 2005 and now, I had changed the name of the computer!

I attempted to go into the SQL Server Configuration Tool but couldn't access the server name. Anyway - when I changed the computer name back to the name it had when I did the installation, Everything worked as before - I was able to connect to the databases, create diagrams, and everything!

I hope this helps some of the others of you that are experiencing difficulties.

JosBoy
|||

Hi,

I want to give you a little point, to help.

If you create a new Database.mdf you see in the properties one point called "owner". In my case the "owner" was "SHAKIRA\Administrator".

My Computername was HNPC1 and I was logged in (Windows, If you boot your Computer) with this name ("HNPC1\Administrator").

I changed the Computername to SHAKIRA and logged in with this (SHAKIRA\Administrator), and now it was possible to create Diagramms.

God luck

|||I am having the same problem but the solutions posted don't seem to help. Are there step-by-step instructions available|||

The problem is to set up the proper database owner. You should:

-download the free tool from Microsoft site: SQL Server Management Studio Express CTP and install it.

-close the connection to the database (I`m using C# Express Edition, using VB.Net is probably quite the same doing that)

-open the new installed SQL tool

-under "Object Explorer" right click on Databases-"attach"

-find the *.mdf-file and add it

-right click on the new attached database, Properties, "Files", be sure to chose your account as the database owner

-connect to the database using C# Express or what ever

-chose the windows security

that is it.

|||

Thanx AndyWawa,

It pays to go read all the thread before attempting to fix a pro. Your solution was the only one that worked for me

|||

OK, I did that, no change, now what?

My path to this problem was through learning asp.net using the Sussman-Homer book from Wrox. I followed the book through building the db and adding database diagrams and everything worked just fine. Now, trying to teach a little asp in an advanced VB class, it fails (most embarassing for a teacher). The only difference between then and now is adding AJAX. My students (no AJAX) can add database diagrams to their copies.

I downloaded sql server management, installed it, and ran it on my laptop iaw the instructions above only to have the "You do not have permission to impersonate..." messagebox show up as has become maddeningly usual.

Next?

Database Diagrams - SQL Server 2005 Express

I have installed Visual Basic 2005 Express and SQL server 2005 Express.

I am reading the ebook: "Microsoft Visual Basic 2005 Express Edition - Build a Program Now" that you download when you register the products (it is a PDF file named 6-2213-2.pdf)

Page 139 of the book (or 151 in the file) is about "To Create Relationships between Tables". So I follow the instruction and get stuck on Step 1. When I right click on the Database Diagrams folder under CarTracker.mdf database and choose Add New Diagram I get the following message:
Microsoft Visual Basic 2005 Express Edition

This database does not have a valid dbo user or you do not have permissions to impersonate the dbo user, so database diagramming is not available. Do you want to make yourself the dbo of this database in order to use database diagramming?

Yes No Help
So I click Yes and get the following error


Microsoft Visual Basic 2005 Express Edition

This database does not have a valid dbo user or you do not have permissions to impersonate the dbo user, so database diagramming is not available. Ensure the dbo account is valid and ensure you have impersonate permission on the dbo account.

OK Help
I am logged in with an account that is a Domain Admin whilst the laptop is not connected to the network. However, I believe this account is like a Local Administraor (from my NT4 days). In other words, I believe it has all the permissions etc. - I don't know what dbo is. I assume it is Database Owner and if it is, well I created the database.

Any guidance would be greatly appreciated ...

Having the same problem here (WXP SP2, Visual SQL Server Express and Visual C# Express). Anyone care to help us out?

Kind regards,

Maurits

Edited to add:

I too am working on a laptop. I'm at home, so I'm not connected to the university network domain but the user account I'm logged in with is indeed an administrator

|||

Here is one more. Just installed Visual Basic 2005 Express Edition on a XP SP2 laptop. Trying to do exercise on page 139 in the "Build a Program Now" book, about creating relationsship between tables.

"This database does not have a valid dbo user or you do not have permissions to impersonate the dbo user, so database diagramming is not avaliable. Do you want to make yourself the dbo of this database in order to use database diagraming?"

I then hit the <Yes> button

"This database does not have a valid dbo user or you do not have permissions to impersonate the dbo user, so database diagramming is not avaliable. Ensure the dbo account is valid and ensure you have impersonate permission on the dbo account."

<OK>

I'm now back to the start again. Shall I create a dbo user account or what?

|||

Here is one more. Just installed Visual Basic 2005 Express Edition on a XP SP2 laptop.

I have the same problem

BR

Alan

|||I had the same problem. My laptop is joined to a domain, and I was working offline. As soon as I connected back to my domain with VPN it starter working again.|||

Brian

Well done. I checked it now that I'm connected to a network domain and I no longer get the error. The diagrams seem to work fine.

Thank you

John

|||

I am also in a domain, but I am connected and still have the problem.

Does this have anything to do with the service account being used? Where can I change the dbo account with SQLExpress?

|||

Regarding service accounts, looking at the service SQL Server (SQLEXPRESS), the Log On tab has:

This account: NT AUTHORITY\NetworkService

[which I never setup or assigned passwords to.]

And looking at the service SQL Server VSS Writer, the Log On tab has:

Local System Account

Please check you have the same settings.

Sorry, I'm not sure if or where you can change dbo account for SQL Express.

|||

I have those same accounts.

I guess the bottom line is...How can I get my account to have impersonate permissions on the dbo account?

Tony Ansley

|||I recently experienced this same problem with the database not having a valid dbo user and being unable to add Database diagrams.

I came to this thread via google and found it to be actually little help since my computer is a stand-alone computer not even connected to the Internet. I am using it for developing the next 'killer app' :)

Anyway - A database connection worked for a while, then it stopped working.

After much fiddling and attempting to recall what I might have broken in the mean time, I realized that between the time that I installed SQL Server Express 2005 and now, I had changed the name of the computer!

I attempted to go into the SQL Server Configuration Tool but couldn't access the server name. Anyway - when I changed the computer name back to the name it had when I did the installation, Everything worked as before - I was able to connect to the databases, create diagrams, and everything!

I hope this helps some of the others of you that are experiencing difficulties.

JosBoy|||

Hi,

I want to give you a little point, to help.

If you create a new Database.mdf you see in the properties one point called "owner". In my case the "owner" was "SHAKIRA\Administrator".

My Computername was HNPC1 and I was logged in (Windows, If you boot your Computer) with this name ("HNPC1\Administrator").

I changed the Computername to SHAKIRA and logged in with this (SHAKIRA\Administrator), and now it was possible to create Diagramms.

God luck

|||I am having the same problem but the solutions posted don't seem to help. Are there step-by-step instructions available|||

The problem is to set up the proper database owner. You should:

-download the free tool from Microsoft site: SQL Server Management Studio Express CTP and install it.

-close the connection to the database (I`m using C# Express Edition, using VB.Net is probably quite the same doing that)

-open the new installed SQL tool

-under "Object Explorer" right click on Databases-"attach"

-find the *.mdf-file and add it

-right click on the new attached database, Properties, "Files", be sure to chose your account as the database owner

-connect to the database using C# Express or what ever

-chose the windows security

that is it.

|||

Thanx AndyWawa,

It pays to go read all the thread before attempting to fix a pro. Your solution was the only one that worked for me

|||

OK, I did that, no change, now what?

My path to this problem was through learning asp.net using the Sussman-Homer book from Wrox. I followed the book through building the db and adding database diagrams and everything worked just fine. Now, trying to teach a little asp in an advanced VB class, it fails (most embarassing for a teacher). The only difference between then and now is adding AJAX. My students (no AJAX) can add database diagrams to their copies.

I downloaded sql server management, installed it, and ran it on my laptop iaw the instructions above only to have the "You do not have permission to impersonate..." messagebox show up as has become maddeningly usual.

Next?

Thursday, March 8, 2012

Database diagram, connector on fields?

Hi there!
Currently I've managed to etablish relationsships on fields to/from
different tables. But the 'visual' result is a bit off from what I wish.
Currently MSSQL diagram designer hooks up the relations from table to table.
I would very much like to change that to 'field to field' instead, as to
make it easier to visually determine relationsships. Or alternative get
MSSQL to automatically change the shown labels to say 'id = catID'.
What options do I have regarding this?
I doubt, therefore I might be.
a different tool
ErWin or ER-Studio are what I recommend
Greg Jackson
PDX, Oregon
|||"pdxJaxon" <GregoryAJackson@.Hotmail.com> wrote in message
news:%23aR2GdzVFHA.2700@.TK2MSFTNGP12.phx.gbl

> ErWin or ER-Studio are what I recommend
Thanks for the recommendation, however it seems that it costs money, and
because I'm not going to use this kind of tool very often (maybe 5-10 times
a year), I really can't justify paying for this. Is there any free tool on
the market, that is easy to use? I only need a few things to visualize.
I doubt, therefore I might be.

database diagram in server explorer

I've created a connection to an SQL 2000 server in an asp.net 2.0 web application using Visual Studio 2005. When I view the database node in the server explorer, it doesn't show the database diagram node. Is there something I need to load to make this node appear? Thanks.

You might want to post this question to the Visual Studio group. I can't recall if this facility is version dependent. They would be able to better answer your question.

Terrence Nevins

SQL Server Program Manager

|||

Unfortunately, Management Studio 2005 and Visual Studio 2005 cannot work with diagrams on SQL Server 2000 servers.

Best regards,
Steve

database diagram in server explorer

I've created a connection to an SQL 2000 server in an asp.net 2.0 web application using Visual Studio 2005. When I view the database node in the server explorer, it doesn't show the database diagram node. Is there something I need to load to make this node appear? Thanks.

You might want to post this question to the Visual Studio group. I can't recall if this facility is version dependent. They would be able to better answer your question.

Terrence Nevins

SQL Server Program Manager

|||

Unfortunately, Management Studio 2005 and Visual Studio 2005 cannot work with diagrams on SQL Server 2000 servers.

Best regards,
Steve

Wednesday, March 7, 2012

database developed by SQL Server 2005 Express edition can not be deployed in IIS?

I developed a site using Visual Web Developer 2005 and the database used is SQL Server 2005 Express edition.

Everything works fine. However, when I move the site to my IIS server, it says that my database is read-only.

Is it because my SQL Server is an express edition?

No. It's because you haven't configured the server correctly. Post the full error or Google it.

Jeff

|||

Hi Windsnow,

Please check the following:

1. Is the database attached to the SQL Server properly?
2. Please configure the users in the database and map them to the logins on the server.

|||

Kevin Yu

I am having the same issue, somewhat. You asked "Is the database attached to the SQL Server properly?" Could you explain more or point me to a location about attaching to the SQL Server?

Thanks!

James

|||

Hi Jame,

I mean that when we move the database to another server, we have to detach the database file from the service and attach it to another server.

Here are 2 useful articles for your reference.

http://msdn2.microsoft.com/en-us/library/ms190209.aspx
http://msdn2.microsoft.com/en-us/library/ms189625.aspx

Also, please try to check if the permission of the users has been set properly. Because the logins will not go with the database file. And you need to map the logins on the new server to the corresponding users in the database.

|||Thanks... That helped out a lot.

Saturday, February 25, 2012

Database design question

I am brand new to both programming and databases and am trying to design a database for my job as a paramedic.

I am using Visual Studio 2005 , and MSSQL . I am trying to create a log for all of our ambulance calls.

My question comes in when I try to design a field that holds our case number , which is formatted as 07-0001. Basically, the year , then four digits for the remainder of the case number .

Any help on how to accomplish this would be SO appreciated !!!I would use a varchar for this.

presumably you want to preserve the minus sign and the leading zero - this rules out any numeric storage types such as int.|||Thanks ! So, does this mean I can't use that field as an ID for my database ? Also, how would I go about the formatting I would need ?

Sorry to be such a novice, but I do SO appreciate the help !|||the reply depends on many other questions. will the database generate the next call-number or it is a user input/front-end generated number? is the number editable? will the number recycle missing numbers specially the last deleted ones?
there are quite a few options. it could be saved in 2 separate fileds and formatted properly during display, it could be a formula field, it could be a plain varchar field with validations etc. etc...

Friday, February 17, 2012

Database creation from inside of Visual C#

When I create a database from inside of Visual C# Express, why can't I view it with the manager from the SQL Server Express Edition? I mean, it does not appear at all. Is there any problem?

hi,

chances are you are using a User Instance, so that you can usually not "browse" your database using a "standard" connection via SQL Server Management Studio.. the article explains how to connect to User Instance databases via other clients than the calling application..

regards

|||

Hi

Well, I followed the article closely and retrieved the pipe and ran the command "sqlcmd -S np:\\.\pipe\010E053B-3912-43\tsql\query" and I received the following error:

"HResult 0x2, Level 16, State 1
Named Pipes Provider: Could not open a connection to SQL Server [2].
Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while establi
shing a connection to the server. When connecting to SQL Server 2005, this failu
re may be caused by the fact that under the default settings SQL Server does not
allow remote connections..
Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired."

I enabled Remote Connections from Surface Area Controll, stoped the service, restarted it, and it gives me the same error. How can I connect to a User Instance with the SQL Server Management? I did not saw such option ...

Also I want to ask if there are some resources to learn for an absolute beginner SQL Server Express. Some recomandations would be nice.

|||

hi,

try the SQL Server Configuration Manager as well... there you can enable the desired nework protocol..

regards

|||

Check out the FAQ at the top of this forum, you will find instructions on connecting Management Studio to a User Instance.

Enabling remote connections is not required, particularly since User Instances only support local connections. If you bravely read through the entire error you got, you'll see that the problem you're having is a timeout. This is a particularly bad error message that gets throwen for basically every connection problem (hey, I wasn't here when they wrote it). The important bit is usually at the end in parenthasis.

In your case I'll bet your User Instance isn't started so you're timing out trying to connect. The FAQ explains the details of how to get this to work.

Mike

Tuesday, February 14, 2012

database corruption

Hi,
I just ran into a big trouble with sqlserver 2005 Express and Visual Basic
2005.
I have a database, wich is an upsize of an AccessXp database, worked until
now perfect with Vb net 2003
I upgraded to Vb2005 for learning purposes an ran into the following
trouble.
1. Opening a database connection in the server explorer and viewing the
tablestructure etc. works ok BUT...
2. Closing the connection corrupts the db!!
Reopening is impssible and the mdf and ldf files are doubled in size!
The only sollution is then complelety removing both files from the HD and
restoring a backup
All the above is also true for the db's like Pubs or Northwind. After making
a connection in server explorer and closing the IDE, the db's are corrupt
and inaccesible by whatever program.
The connection provider is the one suggested by VB2005 for sqlserver Express
: slqlient for local database
With another sqlprovider it even refuse to find the server
This all happens exclusiveli in the "server explorer", a compiled prog or
debugging from within the IDE works perfect.
If i do the same in VB2003 to the same database and server then everything
stays ok
Any suggestion will be appreciated
Thanks in advance
JeromeWhen connecting to a msde server or even the local sqlexpress via the normal
sqlconnection all runs ok.
Only when connecting via the native provider for sqlexpress the database
becomes corrupt
Just wanted to add that the software runs on a dutch version of wndows XP
regards
Jerome
"Jerome" <Jommeke@.fake.com> schreef in bericht
news:xp%hf.57683$tB5.3726394@.phobos.telenet-ops.be...
> Hi,
> I just ran into a big trouble with sqlserver 2005 Express and Visual Basic
> 2005.
> I have a database, wich is an upsize of an AccessXp database, worked until
> now perfect with Vb net 2003
> I upgraded to Vb2005 for learning purposes an ran into the following
> trouble.
> 1. Opening a database connection in the server explorer and viewing the
> tablestructure etc. works ok BUT...
> 2. Closing the connection corrupts the db!!
> Reopening is impssible and the mdf and ldf files are doubled in size!
> The only sollution is then complelety removing both files from the HD and
> restoring a backup
> All the above is also true for the db's like Pubs or Northwind. After
> making a connection in server explorer and closing the IDE, the db's are
> corrupt and inaccesible by whatever program.
> The connection provider is the one suggested by VB2005 for sqlserver
> Express : slqlient for local database
> With another sqlprovider it even refuse to find the server
> This all happens exclusiveli in the "server explorer", a compiled prog or
> debugging from within the IDE works perfect.
> If i do the same in VB2003 to the same database and server then everything
> stays ok
> Any suggestion will be appreciated
> Thanks in advance
> Jerome
>
>