Insert into Fails

  • I am writing a toll from VB which has a backend databse SQL SERVER

    I'm performing a Insert command on Date/Time filed.

    This is working fine in SQL Server english version.But it is faling in SQL Server korein

    SQL is this

    Insert into VectoringGroups (Description,LastModifiedTime) values ( 'qweqwe ', '2003-08-31 ¿ÀÀü 12:32:05')

    One more thing.

    if I use ado

    Dim rstvec As New ADODB.Recordset

    rstvec.Open "VectoringGroups", connConfig, adOpenDynamic, adLockOptimistic

    rstvec.AddNew

    rstvec.Fields("Description") = txtDesc.Text

    rstvec.Fields("LastModifiedTime") = Now

    rstvec.Update

    it woks fine




    My Blog: http://dineshasanka.spaces.live.com/

  • What is the ¿ÀÀü characters for am/pm?

    Like to think if you remove the ¿ÀÀü it should work, specially with yyyy-mm-dd.

    What is the korean default date format.

    Have you tried set dateformat ymd?

    What is the windows locale setting for the client?

  • If you just want to insert and you don't need the recordset fore anything else in your logic, don't use the recordset to do this, but use a native insert statement to do so or use a stored procedure (preferable).

    remove the ¿ÀÀü and it shoud work.

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • Replace the line

    rstvec.Fields("LastModifiedTime") = Now

    with

    rstvec.Fields("LastModifiedTime") = Format$(Now,"yyyy-mm-dd hh:nn:ss")

    and it wil always work.

  • ¿ÀÀü is AMPM for korean

    But I can't remove that As it is the System time format

    Insert into VectoringGroups (Description,LastModifiedTime) values ( 'qweqwe ', '" & now & "')"

    But rstvec.Fields("LastModifiedTime") = Now is working




    My Blog: http://dineshasanka.spaces.live.com/

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply