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

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -