sql server - SQL Syntax to Insert Dates and Times into a Database -
in project, need convert following function, creates string insert database, correct syntax inserting datetime datatype... know way can this?
public shared function sqlstring(str string) string return "'" & str.replace("'", "''") & "'" end function
sql = "insert tblmodules(moduleid, modulename, numberusers, license, username, contractid,datetime) values(" & modid & ", " & sqlstring(modname) & ", " & numusers & "," & sqlstring(license) & ", " & sqlstring(username) & ", " & contractid & ","&sqldatetime(datetime.now)&")" try this
Comments
Post a Comment