I’m trying to perform update operation on winform using connected ado.net layer. here’s the code using this query I’m getting exception $exception {“Dynamic SQL ErrorrnSQL error code = -104rnToken unknown – line 1, column 15rn(“} System.Exception {FirebirdSql.Data.FirebirdClient.FbException} Answer Should not query be like this:
Tag: .net
How to select distinct year from a datetime column and add the result to a comboBox in C#?
I am using visual studio 2010 and SQL Management Studio R2 Although the sql query works fine in sql management studio. Its throws an exception in visual studio. Out of index exception whem i edit to make any other adjustments it throws Out of format exception. Please Help me. The code is as follows: Answer You’re not selecting tdate but
SQLite, insert variable in my table (c# console app)
I was wondering if it is possible to insert a variable in my SQLite table (like the TheName in the example code) , and if it is how are you able to do it ? Answer You need parameterized queries:
How can I connect C# with Db with App.config?
I need to connect C# with SQL Server database using app.config. My code is: and in app.config I have: but I get an error and I can’t fix it: ConfigurationErrorExeption was Unhandled Configuration system failed to initialize Can anyone help me please ? Answer Try: You’re referencing Conn as the connection string name but referenced it as Test1 in the
sql runs fast in ssms slow in asp.net
I have been having this problem for a couple of weeks now. The problem is that the query takes 4-5 minutes to run on the website and at most 2 or 3 seconds to run in ssms. Also I found that after I make a change to this query like adding the customerId variable it will start running quickly on
What is better to return single value from stored procedure to .Net: OUTPUT parameter or ExecuteScalar?
I need to create a stored procedure that needs to return a count of some records. I’m using .Net to read the result. I can use an OUTPUT parameter to return the value or I could do a select count(*) …
How to Troubleshoot Intermittent SQL Timeout Errors
We’ve been having a few instances per day where we get a slew of SQL Timeout errors from multiple applications (System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.) We have over 100 different applications on our network, both web and desktop apps. Everything from VB6 and Classic ASP to
What are the pros and cons of performing calculations in sql vs. in your application
shopkeeper table has following fields: Let’s say, I have the above table. I want to get the records for yesterday and generate a report by having the amount printed to cents. One way of doing is to perform calculations in my java application and execute a simple query and then loop through the records and convert amount to cents in
Convert SQL Server DateTime object to BIGINT (.Net ticks)
I need to convert a DateTime type value to BIGINT type in .Net ticks format (number of 100-nanosecond intervals that have elapsed since 12:00:00 midnight, January 1, 0001). The conversion should be perform in Sql server 2008 using T-SQL query For example: will convert to: Answer I have found a CodeProject article that may assist: Convert DateTime To .NET Ticks
Database Data Types and their equivelants in Windows Forms
I’ve read in forums about people having issues with certain data types when accessing a database from their website and windows forms application. Mostly the decimal, float and datetime data types. My DB Table, for example, the Orders table consists of the following Columns. Below each column is the datatype I have chosen to use: My questions are: Is (in