Skip to content

C# Error : Unable to insert record in SQL

Please pardon my knowledge on C# as I am very new to it,I am unable to insert a record in SQL and getting the below error while insert image to SQL. Error : Object reference not set to an instance …

SQL CASE statement needs to handle Text

Apologies if this has been asked before – I’ve spent a couple of hours searching but not found anything that’s helped. It’s quite simple really – I’ve been asked to create a query which includes a field that when it was set up (not by me) was created as a VARCHAR instead of…

How do I create a structure for a dynamic SQL query?

In my Golang application I make SQL request to the database. Usually, in the SQL query, I specify the columns that I want to get from the table and create a structure based on it. You can see an example of the working code below. QUESTION: What should I do if I don’t know the number and name of columns

Binding dates to SQL in Python for cx_Oracle

I am using the following query to select logs fro a logs table. I have the following dictionary of parameters: and executing the query as follows : Now the problem is I am not getting any values for this date range. But if I execute the query in Oracle, by specifying the dates, it is working. What is wrong he…

Scan row into slice

I want to Scan a sql.Row into a slice like so: but I am getting this error: 2020/02/23 20:05:14 raw query: SELECT * FROM user_table LIMIT 500 2020/02/23 20:05:14 sql: expected 6 destination arguments in Scan, not 0 anyone know how to make this generic without using a slice? Answer You can do it this way: on t…