C#Newbie01


I have been trying to see if I could find answers to these questions online, but haven't had any luck, so I figured I would ask here.

1) I added my database as a datasource, then had to add a field to one of the tables in the database. That field doesn't show up under datasources, and when I refresh the datasources it still doesn't show up. How do I get it to show up Does it need to

2) What happens if after I install this program and have been using it to store data in the database, if I decide I want to add columns to a table, or a new table entirely Can I somehow install these new tables or columns Would I be able to do this without losing any of my data

3) Most of the books and articles I have read have stated that Integrated Security is preferable, yet most of the programs I have seen that use SQL use the sa login. I have not found an article or book that in any way weighed the pros and cons to each. Which one truly is better I don't want to have any problems being able to log in to the database.

Thank you very much.



Re: Some General SQL Questions

cdx1







Re: Some General SQL Questions

joeydj

1. if refresh does not work. the you need to remove the connection and then add it again.

- one of the more common mistake here is that you add a field to a database with the same schema example

you add a field in the prod instead of adding in the dev.

2. Adding a column would not result to data loss in sql server.

The schema change would however requires a change in the dataset or recordset

on the frontend to reflect the change.

3. if you are dealing with internall client let's say a payroll system where every employee has an active directory account

it is of course advisable to use NT authentication however if you are designing an application that deals with external client

you may opt to use sql server login. this also goes with application that uses sql server data but are deployted to other

platform other than windopws







Re: Some General SQL Questions

Arnie Rowland

In addition to Joey's comments, I strongly caution against using the 'sa' account. If you need to use a SQL account, create an account for your needs, and limit its access and permissions to the minimum to accomplish the task.

Using 'sa' ensures that a hacker that gains access to your database through some as of yet unknown exploit has full control of your database, as well as all other databases on the server. You may think that that isn't a risk -but are you willing to be the next 6 PM news story about some major data loss exposing sensitive or protected client data






Re: Some General SQL Questions

C#Newbie01

Eep. Thank you everyone, I definitely don't want to create a security issue. How would I create a user account in VS and change the current database from Integrated Security to this new account

joeydj

- one of the more common mistake here is that you add a field to a database with the same schema example

you add a field in the prod instead of adding in the dev.


I'm sorry, but I don't quite follow the above. What do you mean

How would I setup an update to add columns or tables to the database I hope to use this database for some time, and want to make sure that if need be I will be able to add tables and columns in the future. If I install a new version or something, can I handle this as part of the update

Thank you very much for all of your help.




Re: Some General SQL Questions

C#Newbie01

Also, I wanted to mention that using the Integrated Login, it's kinda a *** shoot whether I will be able to log in or not. Most cases either loging in or closing I get a message that it could not log me in to the database and must close... This is why I am thinking about using a different login type...




Re: Some General SQL Questions

joeydj

- one of the more common mistake here is that you add a field to a database with the same schema example

you add a field in the prod instead of adding in the dev.

well, it does usually happen to me. I added something on the database and dont reflect on the front end. usually i could have added it to some database other than what is intended. maybe on the master database or the dev instead of prod. if this is not your case, drop the object and recreate it again.

A change on the database almost always requires a change in the front end. If this is the requirements of your application

you can build a program that uses a dynamic UI. This can be done by using the createobject or the new keyword

eg.

dim x as new dataset

login type is configured in sql server using either "SQL management studio" or "enterprise manager" depending on your version. you can configure it in the security tab of the server property






Re: Some General SQL Questions

C#Newbie01

Thank you very much, I still can't get the database to let me log in consistently, and tried to find the setting in Microsoft SQL Server Management Studio, but couldn't. When I open the databases properties, the setting is there, but it is greyed out and not editeable... I don't understand what the problem is. Why wouldn't Windows let me log in sometimes, but other times let me log in

Thank you.




Re: Some General SQL Questions

joeydj

maybe you dont have sufficient rights. make sure that you login with an administrator account.





Re: Some General SQL Questions

C#Newbie01

Thank you for your response. I double checked just in case, and I am the administrator. This is very puzzling, I tried to do some searching online, but didn't come across a single instance that looked like the issue I am having... Sometimes I am able to log in with no problem, other times login fails... It's very bizarre... What else could this be

Thank you.




Re: Some General SQL Questions

Diane Sithoo

Sounds like a cached credentials issue to me. Is this a fairly new account, or is it an existing account where your priviledges were recently upgraded If the latter is the case, you may need to ensure you have fully logged-out of everywhere you are currently logged-in with that account, and then try logging in fresh. That usually does the trick for me.





Re: Some General SQL Questions

C#Newbie01

Hm,
Thank you very much for the post. I will definitely look into this further. When I was setting everything up I think I initially set it up so that I would have the required permissions, but if I had made a mistake and corrected it, I suppose this could have been caused as a result. I will have to play around with it a bit.

Thank you very much,