Skip to content
Advertisement

Tag: winforms

Call the maximum from SQL table to textbox

I am working on a Windows Forms C# application and I need to auto generate my invoice number from my database. For that I need to get the maximum value from the database and want to add one with the max value in db, any idea Answer You could design your database table using an IDENTITY column. The database will

update data with connected ado.net layer

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:

Accessing database connection string using app.config in C# winform

I can’t seem to be able to access the app.config database connection string in my c# winforms app. app.config code C# code: When I try the C# code, I get a message: Warning 1 ‘System.Configuration.ConfigurationSettings.AppSettings’ is obsolete: ‘ This method is obsolete, it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.AppSettings’ However, when I try to use: I get an error: Only assignment,

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

Advertisement