Comments are available to members only. Sign up or Log in to view these comments.
Main Topics
Browse All TopicsError:
Microsoft OLE DB Provider for SQL Server (0x80040E07)
Syntax error converting datetime from character string.
Data Structure:
1 event_id int 4 0
0 grade nvarchar 50 1
0 team nvarchar 50 1
0 sport nvarchar 50 1
0 gender nvarchar 50 1
0 opponent nvarchar 50 1
0 e_date datetime 8 1
0 e_day nvarchar 50 1
0 e_time nvarchar 50 1
0 ap nvarchar 50 1
0 location nvarchar 50 1
0 home_visitor nvarchar 50 1
0 message nvarchar 50 1
0 status nvarchar 50 1
0 post_season bit 1 0
0 gate_keeper nvarchar 50 1
0 clock nvarchar 50 1
0 trainer nvarchar 50 1
0 stadium_supervisor nvarchar 50 1
0 facility_code nvarchar 50 1
CREATE PROCEDURE [athsp_update_Events]
(@grade [nvarchar](50),
@sport [nvarchar](50),
@gender [nvarchar](50),
@opponent [nvarchar](50),
@e_date [nvarchar](50),
@e_day [nvarchar](50),
@e_time [nvarchar](50),
@ap [nvarchar](50),
@location [nvarchar](50),
@home_visitor [nvarchar](50),
@message [nvarchar](50),
@post_season [nvarchar](50),
@event_id [nvarchar](50),
@table [nvarchar](50))
AS
Declare @sql varchar(1000)
Set @SQL = 'UPDATE [Athletics].[dbo].[' + @table + ']
SET [grade] = ''' + @grade + ''' ,
[sport] = ''' + @sport + ''' ,
[gender] = ''' + @gender + ''' ,
[opponent] = ''' + @opponent + ''' ,
[e_date] = Convert (datetime, ''' + @e_date + ''') ,
[e_day] = ''' + @e_day + ''' ,
[e_time] = ''' + @e_time + ''' ,
[ap] = ''' + @ap + ''' ,
[location] = ''' + @location + ''' ,
[home_visitor] = ''' + @home_visitor + ''' ,
[message] = ''' + @message + ''' ,
[post_season] = ''' + @post_season + '''
WHERE
( [event_id] = ''' + @event_id + ''')'
EXEC (@SQL)
GO
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: JesterTooPosted on 2005-01-13 at 00:37:37ID: 13032173
Comments are available to members only. Sign up or Log in to view these comments.