User Profile

Collapse

Profile Sidebar

Collapse
Monty sing
Monty sing
Last Activity: Jan 17 '12, 06:08 AM
Joined: Jan 14 '12
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Dear NeoPa i Checked the Date Keyword in my Sql server DB but it's not showing anytype of error as you said Date is reserved keyword. I m using the below query for Checking.

    Code:
    clsobjact.InsertData("insert into Customer(Date)values('" & Format(System.DateTime.Today.Date, "MM/dd/yyyy") & "')")
    See more | Go to post
    Last edited by NeoPa; Jan 16 '12, 05:32 PM. Reason: Added mandatory [CODE] tags for you

    Leave a comment:


  • I think your Connection is already open and you are trying to reopen it that's cause the error is showing

    use code to check the state of database whether is open or closed
    See more | Go to post

    Leave a comment:


  • Code:
    Private Sub ComboBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox.SelectedIndexChanged
    
    ComboSecond.items.add(ComboFirst.Items.Item(Me.ComboFirst.SelectedIndex)
    
    End sub
    Use above code on SelectedIndexCh anged Event
    See more | Go to post
    Last edited by NeoPa; Jan 15 '12, 11:09 PM. Reason: Added mandatory [CODE] tags for you

    Leave a comment:


  • Code:
    "INSERT INTO usr_problem_list(trouble_no, date, user, notes)VALUES(" & Text30.Value & ",'" & Format(System.DateTime.Today.Date, "MM/dd/yyyy") & "', '" & user_name & "', '" & txtNotes & "')"
    The Sql Server save Date in above format so use this and he datatype in DB should be Datetime. Try above query
    See more | Go to post
    Last edited by NeoPa; Jan 15 '12, 11:06 PM. Reason: Added mandatory [CODE] tags for you

    Leave a comment:


  • Monty sing
    started a topic SQL server VS2005 Between Date problem

    SQL server VS2005 Between Date problem

    I am facing problem while fetching a data from SQL server DB

    below is a query i'm executing
    Code:
    select * from Customer where(OrderDate BETWEEN '02/01/2012' and '14/01/2012') and (Item='Dell')
    This query was working correct 2 days back but today i executed the same query and showing below error

    "The Conversion of char datatype to a datetime datatype resulted in an out-of-range datetime value"

    ...
    See more | Go to post
    Last edited by NeoPa; Jan 17 '12, 12:05 AM. Reason: Added mandatory [CODE] tags for you
No activity results to display
Show More
Working...