Skip to content
Advertisement

Tag: c#

How to terminate SQL statements when using DEFAULT value and OleDB?

Using C# and the JET OleDB driver (Microsoft.Jet.OLEDB.4.0) to connect to an old Access database (think Access 97). The following SQL statements work fine: But terminating the statement with a semi-colon (;) causes problems: Can SQL statements with DEFAULT be terminated? Answer Default values can (and probably should) be quoted using double quotes to avoid these errors, among others: Note

how to convert ulong to rowversion

reference to converting sql server rowversion to long or ulong? i can convert SQL RowVersion to ulong by code: Now, I am faced with a problem, how to convert ulong to byte [8]? I save the value of rowversion to a file, then read it and use it to make the query. the query parameter should be byte[] , not

How to connect sql Database with ado.net in Asp.Net Core Mvc 5.0?

I can not find where am i missing. my code like this ; users.cs : } usersAccessLayer.cs ; appsettings.json And finally i got this error; An unhandled exception occurred while processing the request. NullReferenceException: Object reference not set to an instance of an object. Adonet_Sql.Models.users..ctor() in users.cs, line 14 Adonet_Sql.Models.users..ctor() in users.cs bla bla. Answer ConfigurationManager.ConnectionStrings[“DefaultConnection”].ConnectionString; is for .net Core

Advertisement