473,405 Members | 2,415 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Incorrect syntax while entering date value in procediure

i have on procedure named as VouMasterEntry
that is :-
Expand|Select|Wrap|Line Numbers
  1. Create PROCEDURE [dbo].[VouMasterEntry] 
  2.     -- Add the parameters for the stored procedure here
  3.     @VouNum int,
  4.     @CustID nvarchar(30),
  5.     @VouCat char(10),
  6.     @VouType Char(15),
  7.     @Seldate smalldatetime
  8. AS
  9. BEGIN
  10.     -- SET NOCOUNT ON added to prevent extra result sets from
  11.     -- interfering with SELECT statements.
  12.     SET NOCOUNT ON;
  13.  
  14.     -- Insert statements for procedure here
  15.     Insert A_VouMaster(VouNum,CustId,VouCat,VouType,EntryDate)
  16.     values (@VouNum,@CustID,@VouCat,@VouType,GETDATE())
  17.  
  18.  
  19. END
  20.  
now when i m inserting the data into the procedure through then it raises one error :-

Incorrect Syntax Near "/"

may be its of date which i m entering through vb
but i can not find the solution
plz help
Dec 7 '14 #1
1 3653
Luuk
1,047 Expert 1GB
Probably you send the date ('Seldate') in the wrong format.

Base on what i read here:
http://stackoverflow.com/questions/2...e-insert-query

Currently there's a '/' in your date which causes the error

Try to send it as 'YYYYMMDD HH:MM:SS'
(i.e. '20141207 15:46:00')
Dec 7 '14 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: S.Patten | last post by:
Hi, I have a problem with updating a datetime column, When I try to change the Column from VB I get "Incorrect syntax near '942'" returned from '942' is the unique key column value ...
3
by: teddysnips | last post by:
In the script below is the DDL to create some tables and a UDF. What I'm interested in is the UDF at the end. Specifically, these few lines: --CLOSE OTRate --DEALLOCATE OTRate ELSE --...
11
by: Mark Findlay | last post by:
Hello Experts! I am attempting to use the OleDbCommand.ExecuteScaler() function within my ASP.NET C# web page to perform a simple validation, but receive the following error: "Incorrect...
1
by: Sandesh | last post by:
Hello All, Me saying " has any body come across such error would be underestimating". Well I am getting a very peculiar and unique error "Line 1: Incorrect syntax near 'Actions'." ...
3
by: wallic | last post by:
Hello, This is my first post and I am a beginner with SQL code. The code below is supposed to update a new table (loctable) with a calculated value based on the original table (hra_data). ...
0
by: roamnet | last post by:
hi i created database file with .mdf extention ,sql server as a source and use grid view to display data there're no problem in data retrieve and display,but i want to edit it or insert new...
1
by: sweetline priya | last post by:
in my project, the user can enter the date in the format of dd-mm-yyyy in the textbox. after entering the day value, automatic '-' (hyphen) has to be generated.. and after entering the month value...
27
by: dennis1989 | last post by:
Im having problem running the program. Its say i have incorrect syntax at my strsql coding Private Sub ComboBox1_Change() Dim rst As ADODB.Recordset 'Initialize Recordset ...
6
by: dougancil | last post by:
I have the following code: Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles startpayrollButton.Click Dim ssql As String = "select...
2
by: silwar | last post by:
Hi, I have already stored value of author id in list item value while page loads. but when I change index of drop down list to view author information error is shown. I tried to debug using check...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.