Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2003
    Posts
    328

    Unanswered: Sysdate in MySQL

    I am using Dreamweaver MX as a frontend to upload data to a MySQL table. In my table there is a date field that when the user clicks submit the date will be populated automatically. Can someone tel me how to do this? Thanks.

  2. #2
    Join Date
    Jan 2003
    Location
    Paris, France
    Posts
    320
    There are several solution

    First you can create a timestamp field. If you create a new record or update one, MySql will update this field with the system date.
    An other solution is to use NOW() function to retreive the current date.
    Olivier Miossec
    --
    http://www.lasso-developpeur.net/
    --

  3. #3
    Join Date
    Aug 2003
    Posts
    328
    Thanks for your reply. I have the timestamp worked out to the MySQL table. Now the problem is I don't get any records returned in my VB application. Thanks again.

  4. #4
    Join Date
    Sep 2003
    Posts
    69
    I imagine part of your WHERE clause includes the date... Show us the VB code that you are using to assemble the query or the part that actually generates the date you concatenate to the end of the WHERE clause. It may be in the wrong format.

  5. #5
    Join Date
    Aug 2003
    Posts
    328
    Sorry, I had a few extra lines in there. This is what I have.

    Private Sub Form_Load()

    Dim rs11 As ADODB.Recordset
    Dim DB11 As New ADODB.Connection
    Dim ssql2 As String
    ssql2 = "select * from help_desk"
    DB11.ConnectionString = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=survey"
    DB11.Open
    Set rs11 = New ADODB.Recordset
    rs11.CursorType = adOpenKeyset
    rs11.LockType = adLockOptimistic
    rs11.CursorLocation = adUseClient
    rs11.Open ssql2, DB11
    Do Until rs11.EOF
    rs11.MoveNext
    Loop

    Set DataGrid1.DataSource = rs11

    end sub
    Last edited by exdter; 03-17-04 at 14:56.

  6. #6
    Join Date
    Sep 2003
    Posts
    69
    It doesn't appear you are actually limiting the query... this doesn't seem to match up with what you want, you should be using a WHERE if you are doing a join.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •