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

Lists in Python -

android - can not access to progress bar in an other activity -

html - Not able to access next element of an array javascript -