12 Replies - 1736 Views - Last Post: 06 December 2013 - 10:18 PM Rate Topic: -----

#1 ultimatelearner   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 05-December 13

How do I view mssql information

Posted 05 December 2013 - 09:11 AM

Im currently trying ot build a website in Visual Studio 2013. I have a database with tables in mssql. One of those tables has a sql bit ("true"/"false") type. I dont know how to count how many true columns there are and disply them in visul studio. I just want to display the total figure not the actual column.

I also have created a verification so that users may log on to my web applictaion (not using the pre installed login control). I dont know how to I create personal accounts from here so each user that logs in has there own area with their information on it. ie Display there name on login eg Welcom Roscoe J. Also so they can see there own history etc. How would I create member accounts do this in mssql (how) or visual studio (how?).

Pretty please could you be specific as I have read lots and still not understood it. Basically for the final I wanted to have created a live car park booking system. The true or false above displays how many parking space are left etc. If any one knows where I could find similar examples or help at all I would be entirely grateful.

Thank you in advance.

From a desperate learner.

Ps. I am coding in C# asp.net webforms.

This post has been edited by tlhIn`toq: 05 December 2013 - 09:41 PM


Is This A Good Question/Topic? 0
  • +

Replies To: How do I view mssql information

#2 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 14771
  • View blog
  • Posts: 59,045
  • Joined: 12-June 08

Re: How do I view mssql information

Posted 05 December 2013 - 09:24 AM

Quote

I dont know how to count how many true columns there are

SQL's COUNT is pretty nice.
http://technet.micro...y/ms175997.aspx


Quote

How would I create member accounts do this in mssql (how)

Presumably you have a 'user' table, right? If someone is new to your ASP.NET page have them fill a form out.. that information is used in an SQL INSERT statement into that table.. then when the user logs in you can start up a session.
http://msdn.microsof...y/ms178581.aspx
Was This Post Helpful? 0
  • +
  • -

#3 Curtis Rutland   User is offline

  • (╯□)╯︵ (~ .o.)~
  • member icon


Reputation: 5104
  • View blog
  • Posts: 9,283
  • Joined: 08-June 10

Re: How do I view mssql information

Posted 05 December 2013 - 09:29 AM

Quote

Pretty please could you be specific as I have read lots and still not understood it.


That's a great indication that you haven't learned the concepts yet. Reading technical stuff without having any deeper understanding is useless.

I suggest you start with basic SQL tutorials, intros. That will give you the foundation you need to move forward. Any other help is just a bandaid; you'll need another one next time you try to do something. Learn it correctly, from the start, and you won't need people to hold your hand each step of the way.

Also, please don't beg. We're already here to help, begging is unnecessary.
Was This Post Helpful? 1
  • +
  • -

#4 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 14771
  • View blog
  • Posts: 59,045
  • Joined: 12-June 08

Re: How do I view mssql information

Posted 05 December 2013 - 09:30 AM

Quote

how do I view mssql information in visual studio c# damsel in distress

For a second there I thought that was the project name of some VS variant I missed. Ha!
Was This Post Helpful? 0
  • +
  • -

#5 ultimatelearner   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 05-December 13

Re: How do I view mssql information

Posted 05 December 2013 - 09:44 AM

View PostCurtis Rutland, on 05 December 2013 - 09:29 AM, said:

Quote

Pretty please could you be specific as I have read lots and still not understood it.


That's a great indication that you haven't learned the concepts yet. Reading technical stuff without having any deeper understanding is useless.

I suggest you start with basic SQL tutorials, intros. That will give you the foundation you need to move forward. Any other help is just a bandaid; you'll need another one next time you try to do something. Learn it correctly, from the start, and you won't need people to hold your hand each step of the way.

Also, please don't beg. We're already here to help, begging is unnecessary.


The above is hardly useful information and completely patronising. I would love to learn form the beggining but given I have time constraints it would not be possible. I understand the concepts behind the code eg the use of membership however I have an existing database and the user is not allowed to create logins therefore the general use of membershp as shown in tutorials would not aplly to my application. Thanks for ou suggestion though anyway.

View Postmodi123_1, on 05 December 2013 - 09:30 AM, said:

Quote

how do I view mssql information in visual studio c# damsel in distress

For a second there I thought that was the project name of some VS variant I missed. Ha!


Lol nope just a chick that has a tight deadline and no clue.
Was This Post Helpful? 0
  • +
  • -

#6 ultimatelearner   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 05-December 13

Re: How do I view mssql information

Posted 05 December 2013 - 09:54 AM

View Postmodi123_1, on 05 December 2013 - 09:24 AM, said:

Quote

I dont know how to count how many true columns there are

SQL's COUNT is pretty nice.
http://technet.micro...y/ms175997.aspx


Quote

How would I create member accounts do this in mssql (how)

Presumably you have a 'user' table, right? If someone is new to your ASP.NET page have them fill a form out.. that information is used in an SQL INSERT statement into that table.. then when the user logs in you can start up a session.
http://msdn.microsof...y/ms178581.aspx



I studied the sql count conecpt but i wasnt quite sure how to get this to display in my application and where exactly i write the count formula. Also alot of these are not useful when dealing with true and false. I have a staff table howver it is set and I cannot change it. I can only call information from it which is why I am not using the membership class in visual studio because all the tutotrial I see equired a register user piece. I will check out your links though. Thank you soo much. :)
Was This Post Helpful? 0
  • +
  • -

#7 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 14771
  • View blog
  • Posts: 59,045
  • Joined: 12-June 08

Re: How do I view mssql information

Posted 05 December 2013 - 10:10 AM

Quote

I studied the sql count conecpt but i wasnt quite sure how to get this to display in my application

Then I suggest reading up on basic C# to SQL interactions. Basic use of a SqlConnection, SqlCommand, and SqlDataAdapter classes.

http://msdn.microsof...=vs.110%29.aspx
http://msdn.microsof...=vs.110%29.aspx
http://msdn.microsof...=vs.110%29.aspx

http://www.dreaminco...ng-sql-compact/
http://www.dreaminco...basics-in-c%23/
http://www.dreaminco...ery-a-database/

Quote

where exactly i write the count formula

In a string object that is feed to the SQLCommand or SQLAdapater.


Quote

Also alot of these are not useful when dealing with true and false. I

I have no idea what that is referring to or applies to.

Quote

I can only call information from it which is why I am not using the membership class in visual studio

Again, what? Is "membership class" something custom you wrote?

Quote

all the tutotrial I see equired a register user piece.

Typically, yes, with a log-in form you need a register form else you would have no one to log in.
Was This Post Helpful? 1
  • +
  • -

#8 Skydiver   User is offline

  • Code herder
  • member icon

Reputation: 6723
  • View blog
  • Posts: 22,945
  • Joined: 05-May 12

Re: How do I view mssql information

Posted 05 December 2013 - 10:34 AM

View Postultimatelearner, on 05 December 2013 - 11:11 AM, said:

Im currently trying ot build a website in Visual Studio 2013.
:
Ps. I am coding in C# asp.net webforms.


If you are using VS2013, use ASP.NET MVC instead of WebForms. The initial ramp up is a little steeper than WebForms, but plateaus quickly, versus the constant uphill battle you'll have with WebForms.
Was This Post Helpful? 0
  • +
  • -

#9 Curtis Rutland   User is offline

  • (╯□)╯︵ (~ .o.)~
  • member icon


Reputation: 5104
  • View blog
  • Posts: 9,283
  • Joined: 08-June 10

Re: How do I view mssql information

Posted 05 December 2013 - 10:39 AM

@Skydiver

Unlikely, considering this quote from OP:

Quote

I would love to learn form the beggining but given I have time constraints it would not be possible.

Was This Post Helpful? 0
  • +
  • -

#10 tlhIn`toq   User is offline

  • Xamarin Cert. Dev.
  • member icon

Reputation: 6535
  • View blog
  • Posts: 14,450
  • Joined: 02-June 10

Re: How do I view mssql information

Posted 05 December 2013 - 09:49 PM

View Postultimatelearner, on 05 December 2013 - 10:44 AM, said:

The above is hardly useful information and completely patronising. I would love to learn form the beggining but given I have time constraints it would not be possible.


Welcome to the real world out side of school. Not everyone is trying their best to treat you like a special and unique snowflake. Not everyone feels its their job to stroke your ego, be your cheer squad and make sure your self-image isn't being harmed by talking to you like a grown up.

Guess what.. We *ALL* have time constraints. Again, welcome to the world. Personally when I read threads that basically say "I don't have time to learn and comprehend, just tell me what I need to type" my suggestion is usually to reconsider this career choice. Obviously programming isn't your passion and life is too short to be doing something for years that you dislike.
Was This Post Helpful? 1
  • +
  • -

#11 synlight   User is offline

  • D.I.C Addict
  • member icon

Reputation: 90
  • View blog
  • Posts: 582
  • Joined: 14-September 11

Re: How do I view mssql information

Posted 06 December 2013 - 07:08 AM

It seems like the OP is working on a final exam.

I am also a chick OP. No need to try to put your gender out there in hopes that it will entice the male programmers to help. They will help because that's what they are here to do. But, if you are not willing to put the time in to build a solid foundation, why should they waste their effort?

It seems to me like you have perhaps skated through the semester doing only what you HAD to do to pass. Perhaps if you had mastered the concepts as you went along, you would not be struggling right now. I have been a member of this board for a couple of years, throughout school and into my professional career. Your first job will expect your skills to be modest, but adequate. A basic working knowledge of SQL is a MUST, lest you find yourself back on the street looking for a new job a week after you're hired.

I wish you luck, OP. If you really want to be a programmer, you will have to be a lifetime learner. You can do this! I just takes dedication, and a passion for coding.
Was This Post Helpful? 3
  • +
  • -

#12 ultimatelearner   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 05-December 13

Re: How do I view mssql information

Posted 06 December 2013 - 02:36 PM

I am not working on a final exam nor am I trying to use my sexuality to get people to help me damsel in distress is merely a common quote meaning needing help desperately. I am not a programmer nor do I have a job in it or much desire to be one. I was merely trying to help a friend who is getting quite stressed and pulling her hair out over it and yes she has been trying desperately to grasps the concepts. Hence my need to not starting at the beginning she has had this problem a while and whilst I thought I could read about the subject and learn to understand it. It is not my field so I simply couldn't grasp it. So I thought I would ask a world of people that had a kind enough nature to help others around them. This is my first time using this kind of site and I have been judged more than once. I asked for a solution not life advise but I am not 1 to turn away any advice so sincerely thank you.

This post has been edited by andrewsw: 06 December 2013 - 02:40 PM
Reason for edit:: Removed previous quote

Was This Post Helpful? 0
  • +
  • -

#13 tlhIn`toq   User is offline

  • Xamarin Cert. Dev.
  • member icon

Reputation: 6535
  • View blog
  • Posts: 14,450
  • Joined: 02-June 10

Re: How do I view mssql information

Posted 06 December 2013 - 10:18 PM

View Postultimatelearner, on 06 December 2013 - 03:36 PM, said:

... damsel in distress is merely a common quote meaning needing help desperately.

Its clear that English is not your first language. That's fine as we have many foreign speakers here and we do our best to work through language barriers. I admit your English is better than my Russian. But I think in this case you've mis-interpreted the meaning of 'Damsel in distress', at least as far as it is taken in America. Here it does not mean 'Someone needing help desperately.' Here it conjures images of a frail princess in a long gown, faint at any available opportunity and doing her best to ensnare some big strapping prince to save her - in a very 14th century kind of way. The kind of thing that no 20th century woman would be caught dead doing. So when you put that in the title of your question, it really did give the impression you were hoping some male nerd would come to the rescue of a pretty lady. That's why I edited your question to correct the typos, fix the capitalization and take out that bit so it looked a bit less ... what it looked liked.

View Postultimatelearner, on 06 December 2013 - 03:36 PM, said:

I am not a programmer nor do I have a job in it or much desire to be one. I was merely trying to help a friend who is getting quite stressed and pulling her hair out over it and yes she has been trying desperately to grasps the concepts. Hence my need to not starting at the beginning she has had this problem a while and whilst I thought I could read about the subject and learn to understand it.


I'm sure your heart was in the right place with the best of intentions. But I don't think you realize what you are implying ab out your friend. Because if you had done that to me I'd be insulted 7 ways from Sunday. Let me re-frame what you just said and did.

Your friend has been going to school for this, has had the benefit of lectures, professors, co-students, practice, textbooks and hands-on lab work on the subject and yet been having trouble. But you felt you could jump in the middle without any of that, no background, no experience and ask a couple questions and understand the material that she didn't, well enough that you could then teach it to her. Wow! You must feel that you are 100 times smarter than her, either because she's average and you're a genius, or because you're average and she's mentally disabled.

If a friend of mine did something like that, basically demonstrating that they feel I was a low I.Q. chimp in comparison to them - I don't think I would be friends with them much longer. I just don't think I could continue to remain close to someone that held me in such low opinion and had so little regard for my skills, intellect or ability to learn.

This post has been edited by tlhIn`toq: 06 December 2013 - 10:21 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1