Click here to Skip to main content
15,884,176 members
Home / Discussions / Database
   

Database

 
AnswerRe: "Connecting to sql server files" error Pin
Luc Pattyn21-Apr-10 6:08
sitebuilderLuc Pattyn21-Apr-10 6:08 
GeneralRe: "Connecting to sql server files" error Pin
#realJSOP21-Apr-10 7:02
mve#realJSOP21-Apr-10 7:02 
AnswerRe: "Connecting to sql server files" error Pin
dan!sh 22-Apr-10 5:03
professional dan!sh 22-Apr-10 5:03 
GeneralRe: "Connecting to sql server files" error Pin
Luc Pattyn22-Apr-10 5:30
sitebuilderLuc Pattyn22-Apr-10 5:30 
GeneralRe: "Connecting to sql server files" error Pin
dan!sh 22-Apr-10 8:55
professional dan!sh 22-Apr-10 8:55 
GeneralRe: "Connecting to sql server files" error Pin
Luc Pattyn22-Apr-10 9:04
sitebuilderLuc Pattyn22-Apr-10 9:04 
Questionstoring only single value in primary key table and storing multiple values in foreign key table Pin
developerit21-Apr-10 4:06
developerit21-Apr-10 4:06 
AnswerRe: storing only single value in primary key table and storing multiple values in foreign key table Pin
Corporal Agarn21-Apr-10 4:41
professionalCorporal Agarn21-Apr-10 4:41 
The way the stored procedure is currently there will only be a one to one relationship. I would suggest removing the time from TblOrder then before an insert check to see if the values UserName, ShopName, Email already exist.

Something like (not tested)
DECLARE @there INT
SELECT * FROM TblOrder 
WHERE UserName = @username 
    AND ShopName = @shopname
    AND Email = @email 
SET @there = @@rowcount
IF @there = 0 
BEGIN
   -- Your insert
END

Hope this helps
djj
AnswerRe: storing only single value in primary key table and storing multiple values in foreign key table Pin
Ashfield21-Apr-10 5:21
Ashfield21-Apr-10 5:21 
QuestionReturning 2 output parameters in Stored Procedure Pin
Dayekh21-Apr-10 1:17
Dayekh21-Apr-10 1:17 
AnswerRe: Returning 2 output parameters in Stored Procedure Pin
Ashfield21-Apr-10 2:36
Ashfield21-Apr-10 2:36 
GeneralRe: Returning 2 output parameters in Stored Procedure Pin
Dayekh21-Apr-10 4:15
Dayekh21-Apr-10 4:15 
GeneralRe: Returning 2 output parameters in Stored Procedure Pin
Ashfield21-Apr-10 5:19
Ashfield21-Apr-10 5:19 
QuestionGoofy Question About SQL Server Pin
Roger Wright20-Apr-10 16:26
professionalRoger Wright20-Apr-10 16:26 
AnswerRe: Goofy Question About SQL Server Pin
Luc Pattyn20-Apr-10 16:50
sitebuilderLuc Pattyn20-Apr-10 16:50 
JokeRe: Goofy Question About SQL Server Pin
Mycroft Holmes20-Apr-10 16:53
professionalMycroft Holmes20-Apr-10 16:53 
GeneralRe: Goofy Question About SQL Server Pin
Roger Wright22-Apr-10 14:47
professionalRoger Wright22-Apr-10 14:47 
AnswerRe: Goofy Question About SQL Server Pin
Mycroft Holmes20-Apr-10 16:51
professionalMycroft Holmes20-Apr-10 16:51 
GeneralRe: Goofy Question About SQL Server Pin
Luc Pattyn20-Apr-10 16:58
sitebuilderLuc Pattyn20-Apr-10 16:58 
AnswerRe: Goofy Question About SQL Server Pin
Johan Hakkesteegt20-Apr-10 20:06
Johan Hakkesteegt20-Apr-10 20:06 
GeneralRe: Goofy Question About SQL Server Pin
Roger Wright22-Apr-10 14:48
professionalRoger Wright22-Apr-10 14:48 
AnswerRe: Goofy Question About SQL Server Pin
PIEBALDconsult21-Apr-10 4:39
mvePIEBALDconsult21-Apr-10 4:39 
GeneralRe: Goofy Question About SQL Server Pin
Roger Wright22-Apr-10 14:50
professionalRoger Wright22-Apr-10 14:50 
GeneralRe: Goofy Question About SQL Server Pin
Johan Hakkesteegt22-Apr-10 21:59
Johan Hakkesteegt22-Apr-10 21:59 
QuestionSQL Group by and Sum () Pin
I Believe In GOD20-Apr-10 7:37
I Believe In GOD20-Apr-10 7:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.