Showing posts with label basic. Show all posts
Showing posts with label basic. Show all posts

Tuesday, March 27, 2012

Database help

hii have a DB scenario, it may be basic to u, but i am new to this so plz explain in details or if you can provided links to related articles that will be great.

i have sql server 2000 and i am using dataset on my asp.net application. now as Dataset is connenctionless, what will happen if i have filled my dataset with some records from database and updated those records in dataset. in that time some other user deleted some of those records from database. now when i will try to batch update database using my dataset (with records that has been deleted from DB) what will happen? will i get an exception or what. plz explain in detail . any links to articles will be great.

my second question is same, what are the methods to lock database if one user is accessing (updating) one record, so that other user dont get to change it at the same time? do i have to manage it in Database or what.

thank you in advance

regards

Hi,

I think this article will explain a lot

http://www.asp.net/learn/data-access/tutorial-21-vb.aspx

|||

Hi zeeshannasir,

now as Dataset is connenctionless, what will happen if i have filled my dataset with some records from database and updated those records in dataset. in that time some other user deleted some of those records from database.

My question is: what do you mean by "dataset is connectionless"? Do you mean that your database has been detached in your database engine? Well,in that case your database won't be accessible at all so you(and all the other users) cannot modify your database.

As to your second quesion, actually you don't have to worrry about it.All the transactions in SQL has been designed to comply with theACID (Atomicity ,Consistency, Isolation Durability) compliance.For example, if user A is currently opening up and reading the info. of a particular database, and meanwhile, user B is trying to open up the same database. Since there is no modification being made to the database, user B is allowed to open up. However, if user A is writting new data to the database, all the operations user B makes will be denied.

Hope my suggestion helps

|||

hi Bo Chen

what i meant by "dataset is connectionless" is that, i filled my dataset with required data using a stored procedure. now i am not connected to database, plz correct me if i am wrong. any changes i made to dataset is local until i dont batch update manually, is it correct. now what will be the scenario if this is the case, i have filled my dataset and made some changes and while i was doing that someone else also access the same database and changed some of the records.

plz correct me if i am wrong

thanks

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.

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?

Saturday, February 25, 2012

Database Design Question

I have several SQL databases that I am going to create that will all share a
basic part number/part description table, as well as a common customer table.
What is the best way to design this? Should I have a central database that
contains the master tables and then have all of the other tables link to this
table?, or should I set each database with their own copy of this part
number/customer table so they can link to those instead (and then setup some
type of replication)?
I just was not sure if it was good practice to be constantly joining tables
from two different databases each time a SELECT statement is run.
Any help would be appreciated.
Thank you.
Scott Fox, MCADJoining across databases is no problem (across instances can be, performancewise). You cannot define
foreign keys, though. So data integrity (RI) has to be done using triggers. There's no best way,
though. Consider advantages and disadvantages for both approaches and use the one that suits you
best. And handle the disadvantages that the solution has.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Scott" <Scott@.discussions.microsoft.com> wrote in message
news:F9BC8DAB-6122-4BC8-AA45-90DCED9EEE79@.microsoft.com...
>I have several SQL databases that I am going to create that will all share a
> basic part number/part description table, as well as a common customer table.
> What is the best way to design this? Should I have a central database that
> contains the master tables and then have all of the other tables link to this
> table?, or should I set each database with their own copy of this part
> number/customer table so they can link to those instead (and then setup some
> type of replication)?
> I just was not sure if it was good practice to be constantly joining tables
> from two different databases each time a SELECT statement is run.
> Any help would be appreciated.
> Thank you.
> Scott Fox, MCAD

Friday, February 24, 2012

DataBase Design Problem....

i have requirement in my project that i have a entiity called service that
has some basic attribute that we know for every service is same for eg
(service no,s name,service type ,sla) i have a table for service that includ
e
all the basic attributes , but the problem is every service can have some
advance attributes that are not know at design time for e.g new pc request
service has some advance attributes for this i have created two table one
that created advance attributes of a service ( table has , attribut name ,
data type e.g ) as a columns then second table has values for every advance
attribute uses
service table advance attribute table advance attribut value tab;e
service no att id att id
service name data type service no
service type name value
sno
etc
do v have better solution to this requiremnt
--
Regards
Adeel Alvi
92-300-2584597This is a design that we have also used wherein the main attributes are
placed in a regular table, but the unknown attributes are placed in another
table which has an FK (to the primary table), a AttributeName column, a
DataType column and a Value column. However, one issue you might have is on
the datatypes. You can either have 1 place holder column for each data type
and then place your values accordingly or always use (N)VARCHAR.
Incidentally, we are thinking of moving such a design into XML. Since these
are unknown attributes and can keep changing, we can model this as an XML
document and store it in the database and then use it for processing. If you
are using SQL Server 2005, XML is a native data type and you have XQuery to
use for processing. In SQL Server 2000, you have to get it to the
application tier to do the processing.
This is how we have modelled it, but others in this group might have other
ideas.
--
HTH,
SriSamp
Email: srisamp@.gmail.com
Blog: http://blogs.sqlxml.org/srinivassampath
URL: http://www32.brinkster.com/srisamp
"AdeelAlvi" <alvi_adeel@.hotmail.com> wrote in message
news:11060E87-5878-4AB1-B749-57B4AD7EFD89@.microsoft.com...
>i have requirement in my project that i have a entiity called service that
> has some basic attribute that we know for every service is same for eg
> (service no,s name,service type ,sla) i have a table for service that
> include
> all the basic attributes , but the problem is every service can have some
> advance attributes that are not know at design time for e.g new pc request
> service has some advance attributes for this i have created two table one
> that created advance attributes of a service ( table has , attribut name ,
> data type e.g ) as a columns then second table has values for every
> advance
> attribute uses
> service table advance attribute table advance attribut value tab;e
> service no att id att id
> service name data type service no
> service type name value
> sno
> etc
> do v have better solution to this requiremnt
> --
> Regards
> Adeel Alvi
> 92-300-2584597|||AdeelAlvi wrote:
> i have requirement in my project that i have a entiity called service that
> has some basic attribute that we know for every service is same for eg
> (service no,s name,service type ,sla) i have a table for service that incl
ude
> all the basic attributes , but the problem is every service can have some
> advance attributes that are not know at design time for e.g new pc request
> service has some advance attributes for this i have created two table one
> that created advance attributes of a service ( table has , attribut name ,
> data type e.g ) as a columns then second table has values for every advanc
e
> attribute uses
> service table advance attribute table advance attribut value tab;e
> service no att id att id
> service name data type service no
> service type name value
> sno
> etc
> do v have better solution to this requiremnt
> --
> Regards
> Adeel Alvi
> 92-300-2584597
The best solution is good business analysis during design followed by
good change control when you go live. In a corporate environment end
users are not the best people to decide how to add new attributes.
Users won't think about functional dependencies or validation or
encoding conventions or conformance to internal standards. Those things
are best left to database professionals. If your database development /
administration team takes ownership of change control then you can just
continue to add new columns in future.
If you are a software vendor then the considerations are different.
You'll probably want to add some "loosely-typed" structures such as you
have proposed.
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--|||dear SriSamp
we are using sql server 2000
if we use xml approach , then what will be the right approach beacuse then
advance attribute to a particular service will be defines one time and then
it will be used for transaction that we normally do in usuall senario first
creating the table then inserting the record in it . one thing to mentioned
is that we design custom forms also on our advance attribute that are used
for service request , for e.g new pc request service will have some advance
attribute like sno model manaufacture vender configuration etc that will be
used in new pc request form .
will you plz tell me the right approach to move ahead
--
Regards
Adeel Alvi
92-300-2584597
"SriSamp" wrote:

> This is a design that we have also used wherein the main attributes are
> placed in a regular table, but the unknown attributes are placed in anothe
r
> table which has an FK (to the primary table), a AttributeName column, a
> DataType column and a Value column. However, one issue you might have is o
n
> the datatypes. You can either have 1 place holder column for each data typ
e
> and then place your values accordingly or always use (N)VARCHAR.
> Incidentally, we are thinking of moving such a design into XML. Since thes
e
> are unknown attributes and can keep changing, we can model this as an XML
> document and store it in the database and then use it for processing. If y
ou
> are using SQL Server 2005, XML is a native data type and you have XQuery t
o
> use for processing. In SQL Server 2000, you have to get it to the
> application tier to do the processing.
> This is how we have modelled it, but others in this group might have other
> ideas.
> --
> HTH,
> SriSamp
> Email: srisamp@.gmail.com
> Blog: http://blogs.sqlxml.org/srinivassampath
> URL: http://www32.brinkster.com/srisamp
> "AdeelAlvi" <alvi_adeel@.hotmail.com> wrote in message
> news:11060E87-5878-4AB1-B749-57B4AD7EFD89@.microsoft.com...
>
>

Database Design Books

Hi folks,
Could some one suggest good Database Design books from
basic to InDepth . I have one from Wrox "Professional SQL
Server 2000 Database Design".
Thanks for the Help
ChipChip,
> Could some one suggest good Database Design books from
> basic to InDepth . I have one from Wrox "Professional SQL
> Server 2000 Database Design".
Database Design for Mere Mortals
Michael J. Hernandez
Addison Wesley, 1997
ISBN 0-201-69471-9
Data Modeling Essentials, 2nd Edition
Graeme C. Simsion
The Coriolis Group, 2001
ISBN 1-57610-872-4
Information Modeling and Relational Databases
Terry Halpin
Morgan Kaufmann, 2001
ISBN 1-55860-672-6
The Data Model Resource Book, Volume I
A Library of Universal Data Models for All Enterprises
Len Siverston
John Wiley & Sons, 2001
ISBN 0-471-38023-7
The Data Model Resource Book, Volume II
A Library of Universal Data Models by Industry Types
Len Siverston
John Wiley & Sons, 2001
ISBN 0-471-35348-5
Some online resources:
http://www.utexas.edu/its/windows/database/datamodeling/dm/design.html
http://www.cs.sfu.ca/CC/354/zaiane/material/notes/Chapter7/node1.html
http://www.palslib.com/Fundamentals/Database_Design.html
http://www.martinfowler.com/articles/evodb.html
Linda|||Hi Linda,
Thank you very much for the books list and for pointing me
to some good resources.
Best Regards
Chip
>--Original Message--
>Chip,
>> Could some one suggest good Database Design books from
>> basic to InDepth . I have one from Wrox "Professional
SQL
>> Server 2000 Database Design".
>Database Design for Mere Mortals
>Michael J. Hernandez
>Addison Wesley, 1997
>ISBN 0-201-69471-9
>Data Modeling Essentials, 2nd Edition
>Graeme C. Simsion
>The Coriolis Group, 2001
>ISBN 1-57610-872-4
>Information Modeling and Relational Databases
>Terry Halpin
>Morgan Kaufmann, 2001
>ISBN 1-55860-672-6
>The Data Model Resource Book, Volume I
>A Library of Universal Data Models for All Enterprises
>Len Siverston
>John Wiley & Sons, 2001
>ISBN 0-471-38023-7
>The Data Model Resource Book, Volume II
>A Library of Universal Data Models by Industry Types
>Len Siverston
>John Wiley & Sons, 2001
>ISBN 0-471-35348-5
>
>Some online resources:
>http://www.utexas.edu/its/windows/database/datamodeling/dm
/design.html
>http://www.cs.sfu.ca/CC/354/zaiane/material/notes/Chapter7
/node1.html
>http://www.palslib.com/Fundamentals/Database_Design.html
>http://www.martinfowler.com/articles/evodb.html
>
>Linda
>
>.
>

Database Design - newbie question

Hi ,
First of all my apologies for this very basic question but I can n't find a
definite answers to this question.
I'm new to data warehousing and have started reading "The Data Warehouse
Lifecycle Toolkit" by Kimbal (and others). From it I understood that the
database in your application (normalised) is very differenent to the one in
your warehouse (denormalised). But from reading about SQL Server analysis
server it does n't seem to matter what you use as your source as you can
create your cubes from an application database design.
Is this right? are there any drawbacks to this. It would mean that we won't
need another table design for our warehouse database.
Thanks,
Nuala
What differentiates the data warehouse design from the online transactional
database is the following:
1. To optimize the OLTP database, historical records are often migrated
to the warehouse, and it is from here that trend reports / analysis are
generated. Also, the indexing on the warehouse is optimized for analysis
purposes. The warehouse typically has much more indexing.
2. The warehouse databases are typically located on a different server
that is used exclusively for reporting and analysis. This reduces the load
on the OLTP server.
3. To improve the performace of analysis, data in the warehouse may be
stored in multiple levels of summarization, and most analysis may only be
derived from the smaller summarized datasets.
So the idea of data warehousing is that you perform your analysis against
summarized and highly indexed data instead of at the transactional level.
"Nuala" <nuala.cullen@.prnewswire.co.uk> wrote in message
news:BE655942-E657-46BF-AEAD-9A607AEEAB6F@.microsoft.com...
> Hi ,
> First of all my apologies for this very basic question but I can n't find
a
> definite answers to this question.
> I'm new to data warehousing and have started reading "The Data Warehouse
> Lifecycle Toolkit" by Kimbal (and others). From it I understood that the
> database in your application (normalised) is very differenent to the one
in
> your warehouse (denormalised). But from reading about SQL Server analysis
> server it does n't seem to matter what you use as your source as you can
> create your cubes from an application database design.
> Is this right? are there any drawbacks to this. It would mean that we
won't
> need another table design for our warehouse database.
> Thanks,
> --
> Nuala
|||Quoting JT in microsoft.public.sqlserver.datawarehouse:

>So the idea of data warehousing is that you perform your analysis against
>summarized and highly indexed data instead of at the transactional level.
Recommended reading (since I've just read it... )
"The impact of alternative diagrams on the accuracy of recall:
A comparison of star-schema diagrams and entity-relationship diagrams"
Corral et al., ' www.sciencedirect.com ' .
All that we see, or seem,
is but a dream, within a dream,
installed by the Machine

Database Design - newbie question

Hi ,
First of all my apologies for this very basic question but I can n't find a
definite answers to this question.
I'm new to data warehousing and have started reading "The Data Warehouse
Lifecycle Toolkit" by Kimbal (and others). From it I understood that the
database in your application (normalised) is very differenent to the one in
your warehouse (denormalised). But from reading about SQL Server analysis
server it does n't seem to matter what you use as your source as you can
create your cubes from an application database design.
Is this right? are there any drawbacks to this. It would mean that we won't
need another table design for our warehouse database.
Thanks,
NualaWhat differentiates the data warehouse design from the online transactional
database is the following:
1. To optimize the OLTP database, historical records are often migrated
to the warehouse, and it is from here that trend reports / analysis are
generated. Also, the indexing on the warehouse is optimized for analysis
purposes. The warehouse typically has much more indexing.
2. The warehouse databases are typically located on a different server
that is used exclusively for reporting and analysis. This reduces the load
on the OLTP server.
3. To improve the performace of analysis, data in the warehouse may be
stored in multiple levels of summarization, and most analysis may only be
derived from the smaller summarized datasets.
So the idea of data warehousing is that you perform your analysis against
summarized and highly indexed data instead of at the transactional level.
"Nuala" <nuala.cullen@.prnewswire.co.uk> wrote in message
news:BE655942-E657-46BF-AEAD-9A607AEEAB6F@.microsoft.com...
> Hi ,
> First of all my apologies for this very basic question but I can n't find
a
> definite answers to this question.
> I'm new to data warehousing and have started reading "The Data Warehouse
> Lifecycle Toolkit" by Kimbal (and others). From it I understood that the
> database in your application (normalised) is very differenent to the one
in
> your warehouse (denormalised). But from reading about SQL Server analysis
> server it does n't seem to matter what you use as your source as you can
> create your cubes from an application database design.
> Is this right? are there any drawbacks to this. It would mean that we
won't
> need another table design for our warehouse database.
> Thanks,
> --
> Nuala|||Quoting JT in microsoft.public.sqlserver.datawarehouse:

>So the idea of data warehousing is that you perform your analysis against
>summarized and highly indexed data instead of at the transactional level.
Recommended reading (since I've just read it... )
"The impact of alternative diagrams on the accuracy of recall:
A comparison of star-schema diagrams and entity-relationship diagrams"
Corral et al., ' www.sciencedirect.com ' .
All that we see, or seem,
is but a dream, within a dream,
installed by the Machine

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
>
>