Jump to content


Photo

New to MS SQL.


  • Please log in to reply
2 replies to this topic

#1 coldfused

coldfused
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 06 September 2006 - 06:57 PM

Hey everyone, I'm new to MS SQL, I've used MySQL before and that looked a lot easier to use. I'm building a dynamic website for a social club at my university, and they will host me, but they don't have MySQL, so I'm trying to learn MS SQL.

I've installed it with php, apache and it seems to work smoothly with no hiccups. I've been reading online tutorials on how to create tables and learn some new things like which come under a different function name than MySQL.
Anyhoo there are a number of questions I would like to ask.

The first being is that I've installed MS SQL 2005 Express Edition and used the table maker wizard thing to add primary keys, constraints and variables. Is there a saved text version of this schema saved on my PC? because I need to execute the same CREATE TABLE query on the host machine.

Also, I have a user table which stores username and passwords, I tried to enter a row using the query editor in the management studio and it goes like this:

INSERT INTO wucc_users
(first_name,email,warwick_uni_id,username,password)
VALUES
('John Smith','j.smith@warwick.ac.uk',
'0510467','g','b5186280b66ab24234ea7f969faf6b4f')

and it gave me the error message:
Msg 208, Level 16, State 1, Line 2
Invalid object name 'wucc_users'.

And I don't know what to do because as far as I'm aware the code above is correct.
I also have other fields like userlevel, date and ban level which are not included in the above query but they all have default values which shouldn't matter.

Can someone help please?

#2 stockton

stockton
  • Members
  • PipPipPip
  • Advanced Member
  • 319 posts
  • LocationMidrand South Africa

Posted 29 September 2006 - 12:33 PM

Do you have a table called wucc_users? Look in SQL Server Enterprise Manager and see what exists within that database where the table wucc_users table should be.
Regards,
Alf Stockton   Programmer for rent.

#3 melqui

melqui
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 14 December 2006 - 07:05 PM

Hello, ┬┐tryed you the function mssql_select_db() to set the current active database on the server?

Good bye and that God bleess we.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users