Click here to Skip to main content
15,899,679 members
Home / Discussions / Database
   

Database

 
GeneralRe: Creating tables\database design Pin
Mike Ellison8-Feb-06 10:56
Mike Ellison8-Feb-06 10:56 
GeneralRe: Creating tables\database design Pin
TheJudeDude8-Feb-06 11:28
TheJudeDude8-Feb-06 11:28 
GeneralRe: Creating tables\database design Pin
Mike Ellison8-Feb-06 12:52
Mike Ellison8-Feb-06 12:52 
GeneralRe: Creating tables\database design Pin
TheJudeDude8-Feb-06 13:07
TheJudeDude8-Feb-06 13:07 
GeneralRe: Creating tables\database design Pin
Mike Ellison8-Feb-06 13:18
Mike Ellison8-Feb-06 13:18 
GeneralRe: Creating tables\database design Pin
TheJudeDude8-Feb-06 13:23
TheJudeDude8-Feb-06 13:23 
GeneralRe: Creating tables\database design Pin
Mike Ellison8-Feb-06 13:45
Mike Ellison8-Feb-06 13:45 
GeneralRe: Creating tables\database design Pin
TheJudeDude8-Feb-06 14:28
TheJudeDude8-Feb-06 14:28 
Ok...had to vpn to the office and grab the code and database.
Heres what I have in C# Code

SqlCommand cmdUpdateTime = new SqlCommand("SetTime",conn);
cmdUpdateTime.Parameters.Add("@EmpNumber",SqlDbType.Int).Value = m_intEmployeeID;
cmdUpdateTime.Parameters.Add("@TimeIn",SqlDbType.SmallDateTime).Value = DateTime.Now;
switch(DateTime.Now.DayOfWeek)
{
case DayOfWeek.Wednesday:
cmdUpdateTime.ExecuteNonQuery();
break;
}
conn.Close();
}
catch (SqlException caught)
{
MessageBox.Show(caught.Message,"Error");
}
and here is the Stored Procedure:
ALTER PROCEDURE dbo.SetTime
(
@EmpNumber int,
@TimeIn smalldatetime
)


AS
INSERT INTO Emptime(EmpID,WedIn)
VALUES(@EmpNumber,@TimeIn)
RETURN

What I am getting nw is the error:
Incorrect syntax near "SetTime"
???
Thanx for all your help!

GeneralRe: Creating tables\database design Pin
Mike Ellison8-Feb-06 16:14
Mike Ellison8-Feb-06 16:14 
GeneralRe: Creating tables\database design Pin
TheJudeDude8-Feb-06 16:46
TheJudeDude8-Feb-06 16:46 
GeneralRe: Creating tables\database design Pin
Mike Ellison9-Feb-06 3:28
Mike Ellison9-Feb-06 3:28 
GeneralRe: Creating tables\database design Pin
TheJudeDude9-Feb-06 7:07
TheJudeDude9-Feb-06 7:07 
GeneralRe: Creating tables\database design Pin
Mike Ellison9-Feb-06 7:11
Mike Ellison9-Feb-06 7:11 
GeneralRe: Creating tables\database design Pin
TheJudeDude9-Feb-06 8:13
TheJudeDude9-Feb-06 8:13 
GeneralRe: Creating tables\database design Pin
TheJudeDude9-Feb-06 9:12
TheJudeDude9-Feb-06 9:12 
QuestionDifference between two tables!!! Pin
Small Rat8-Feb-06 6:22
Small Rat8-Feb-06 6:22 
AnswerRe: Difference between two tables!!! Pin
Chris Meech8-Feb-06 6:29
Chris Meech8-Feb-06 6:29 
QuestionCannot access Database Diagrams after disconnecting from Network Domain? Pin
Rashar8-Feb-06 5:55
Rashar8-Feb-06 5:55 
QuestionHow to Retrive day of a date Pin
luckyv8-Feb-06 0:14
luckyv8-Feb-06 0:14 
AnswerRe: How to Retrive day of a date Pin
dansoft8-Feb-06 2:59
dansoft8-Feb-06 2:59 
AnswerRe: How to Retrive day of a date Pin
Luis Alonso Ramos8-Feb-06 17:53
Luis Alonso Ramos8-Feb-06 17:53 
QuestionUsing a varible in select clause Pin
awisey7-Feb-06 23:19
awisey7-Feb-06 23:19 
AnswerRe: Using a varible in select clause Pin
Mike Ellison8-Feb-06 6:21
Mike Ellison8-Feb-06 6:21 
QuestionOleDbDataReader Pin
myNameIsRon7-Feb-06 21:51
myNameIsRon7-Feb-06 21:51 
AnswerRe: OleDbDataReader Pin
VMSSanthosh7-Feb-06 23:08
VMSSanthosh7-Feb-06 23:08 

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.