¡@

Home 

c# Programming Glossary: db

Create Excel (.XLS and .XLSX) file from C# [closed]

http://stackoverflow.com/questions/151005/create-excel-xls-and-xlsx-file-from-c-sharp

Excel to be on the machine you are using. Also the OLEDB method is intriguing but may not yield much more than what I.. Open a DB connection in this example with OleDB OleDbConnection con new.. Open a DB connection in this example with OleDB OleDbConnection con new OleDbConnection dbConnectionString con.Open..

What are the pros and cons to keeping SQL in Stored Procs versus Code

http://stackoverflow.com/questions/15142/what-are-the-pros-and-cons-to-keeping-sql-in-stored-procs-versus-code

the SQL inline in C# and calling to the SQL Server DB. So I'm trying to establish which for this particular project.. a SQL script to update queries Easier to port to another DB no procs to port Advantages for Stored Procs Performance Security..

How to create and connect custom user buttons/controls with lines using windows forms

http://stackoverflow.com/questions/15819318/how-to-create-and-connect-custom-user-buttons-controls-with-lines-using-windows

int and double properties that can be loaded saved from a DB or whatever other data source. If you dislike the way click..

the difference between try/catch/throw and try/catch(e)/throw e

http://stackoverflow.com/questions/1697216/the-difference-between-try-catch-throw-and-try-catche-throw-e

executes the Person.Save method somewhere. If your DB refuses to save the Person then .Save will throw an exception... depends. What I prefer is doing try ... person.Save catch DBException e throw new InvalidPersonException The person has an.. invalid state and could not be saved e This should put the DBException as the Inner Exception of the newer exception being..

What NoSQL solutions are out there for .NET? [closed]

http://stackoverflow.com/questions/1777103/what-nosql-solutions-are-out-there-for-net

Client with a strong focus on performance. Running Raven DB's own benchmarks the default redis server configuration is 16.9x.. redis server configuration is 16.9x faster than Raven DB. When adjusted to use the appendfsync always option though not..

Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine

http://stackoverflow.com/questions/1991643/microsoft-jet-oledb-4-0-provider-is-not-registered-on-the-local-machine

provider is not registered on the local machine I created.. in a 64 bit server it shows the error Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine . So as.. in the 32bit machine. But the same project uses other DB drivers DB2 SQL etc. to connect to other databases. So when..

Storing credit card details

http://stackoverflow.com/questions/206438/storing-credit-card-details

Parsing CSV files in C#

http://stackoverflow.com/questions/2081418/parsing-csv-files-in-c-sharp

my own parser. Also I've seen instances of people using ODBC OLE DB to read CSV via the Text driver and a lot of people.. parser. Also I've seen instances of people using ODBC OLE DB to read CSV via the Text driver and a lot of people discourage..

Transactions in .net

http://stackoverflow.com/questions/224689/transactions-in-net

need to do some transactions while inserting data into the DB. Any responses or links for even basic stuff about transactions..

The underlying provider failed on Open

http://stackoverflow.com/questions/2475008/the-underlying-provider-failed-on-open

provider failed on Open I was using .mdf for connect to DB and entityClient. Now I want to change the connection string..

Access to Modified Closure (2)

http://stackoverflow.com/questions/304258/access-to-modified-closure-2

string lists new List string Code to retrieve lists from DB foreach string list in lists Button btn new Button btn.Click..

Developing Internet Explorer Extensions?

http://stackoverflow.com/questions/5643819/developing-internet-explorer-extensions

with IE8 IE7 that's not an option. Maybe a SQLite DB or such It is okay to assume that .NET 4.0 will be installed..

Fastest Way of Inserting in Entity Framework

http://stackoverflow.com/questions/5940225/fastest-way-of-inserting-in-entity-framework

9 scalar properties no navigation properties into the DB. With this code it works in less than 3 minutes. For the performance..

Should I store my images in the database or folders? [duplicate]

http://stackoverflow.com/questions/713243/should-i-store-my-images-in-the-database-or-folders

or folders duplicate Possible Duplicate Storing Images in DB Yea or Nay Hi At the moment each Company on my website have.. for storing the images while keeping their properties in a DB. Main reason I had client for I made a website for. There was.. the ability to update an image once it was saved to the DB but it had to be done one record at a time. If this same thing..

ExecuteReader requires an open and available Connection. The connection's current state is Connecting

http://stackoverflow.com/questions/9705637/executereader-requires-an-open-and-available-connection-the-connections-curren

dr sql.ExecuteReader while dr.Read promotionID DB2int dr PromotionID promotionTitle DB2string dr PromotionTitle.. dr.Read promotionID DB2int dr PromotionID promotionTitle DB2string dr PromotionTitle promotionUrl DB2string dr PromotionURL.. promotionTitle DB2string dr PromotionTitle promotionUrl DB2string dr PromotionURL promotion new Promotion promotionID promotionTitle..

Connecting to SQL Server with Visual Studio Express Editions [closed]

http://stackoverflow.com/questions/188963/connecting-to-sql-server-with-visual-studio-express-editions

manually correct the connection string to point to your db. I think the reasoning behind those db choices probably goes.. to point to your db. I think the reasoning behind those db choices probably goes something like this If you're using the.. server class databases to end user desktops. An in process db like Sql Server Compact or MS Access is much more appropriate...

Transactions in .net

http://stackoverflow.com/questions/224689/transactions-in-net

transaction such as SqlTransaction is tied directly to the db connection such as SqlConnection which means that you have to.. allow create use release usage and doesn't allow cross db work. An example formatted for space using IDbTransaction tran..

How do I create a custom membership provider for ASP.NET MVC 2?

http://stackoverflow.com/questions/2771094/how-do-i-create-a-custom-membership-provider-for-asp-net-mvc-2

override string GetRolesForUser string username SpHelper db new SpHelper DataTable roleNames null try get roles for this.. null try get roles for this user from DB... roleNames db.ExecuteDataset ConnectionManager.ConStr sp_GetUserRoles new..

Sharing sessions across applications using the ASP.NET Session State Service

http://stackoverflow.com/questions/2868316/sharing-sessions-across-applications-using-the-asp-net-session-state-service

SOMEKEY validation SHA1 decryption AES Session state db would need to be set up on a database server that both apps..

When should I dispose of a data context

http://stackoverflow.com/questions/389822/when-should-i-dispose-of-a-data-context

public static MyClass GetMyClassById int id DataContext db new DataContext MyClass result from item in db.MyClasss where.. DataContext db new DataContext MyClass result from item in db.MyClasss where item.id id select item .Single result.myDb.. where item.id id select item .Single result.myDb db return result public void Save db.SubmitChanges That's a gross..

Entity Framework 4 - AddObject vs Attach

http://stackoverflow.com/questions/3920111/entity-framework-4-addobject-vs-attach

the appropriate row by finding its matching ID in the db table. Furthermore using the Attach method you can define relationships..

Proper Use of yield return

http://stackoverflow.com/questions/410026/proper-use-of-yield-return

Product GetAllProducts using AdventureWorksEntities db new AdventureWorksEntities var products from product in db.Product.. new AdventureWorksEntities var products from product in db.Product select product foreach Product product in products.. Product GetAllProducts using AdventureWorksEntities db new AdventureWorksEntities var products from product in db.Product..

How to Count Duplicates in List with LINQ

http://stackoverflow.com/questions/454601/how-to-count-duplicates-in-list-with-linq

List game inventory new List game drinkingforDataContext db new drinkingforDataContext foreach string item in tbTitle.Text.Split.. in tbTitle.Text.Split ' ' List game getItems from dfg in db.drinkingfor_Games where dfg.game_Name.Contains tbTitle.Text..

LINQ to SQL: Return anonymous type?

http://stackoverflow.com/questions/534690/linq-to-sql-return-anonymous-type

this with no problems public IQueryable Dog GetDogs var db new DogDataContext ConnectString var result from d in db.Dogs.. db new DogDataContext ConnectString var result from d in db.Dogs join b in db.Breeds on d.BreedId equals b.BreedId select.. ConnectString var result from d in db.Dogs join b in db.Breeds on d.BreedId equals b.BreedId select d return result..

Windows Impersonation from C#

http://stackoverflow.com/questions/559719/windows-impersonation-from-c-sharp

but at times impersonate user XYZ when connecting to a db using windows integrated security . Most important of all Is..

Writing large number of records (bulk insert) to Access in .NET/C#

http://stackoverflow.com/questions/7070011/writing-large-number-of-records-bulk-insert-to-access-in-net-c

.Substring 12 DateTime start DateTime.Now DAO.DBEngine dbEngine new DAO.DBEngine DAO.Database db dbEngine.OpenDatabase.. DAO.DBEngine dbEngine new DAO.DBEngine DAO.Database db dbEngine.OpenDatabase databaseName db.Execute DELETE FROM TEMP.. DAO.DBEngine dbEngine new DAO.DBEngine DAO.Database db dbEngine.OpenDatabase databaseName db.Execute DELETE FROM TEMP..

How to create custom additional fields in UserProfile in MVC4

http://stackoverflow.com/questions/12435252/how-to-create-custom-additional-fields-in-userprofile-in-mvc4

when i regenerate database i havent see any changes Custom Db fields not generated. Help me please how can i create custom.. to my EF Code First model public class MyDatabaseContext DbContext public DbSet UserProfile UserProfiles get set protected.. model public class MyDatabaseContext DbContext public DbSet UserProfile UserProfiles get set protected override void..

Writing driver class generic for any database support

http://stackoverflow.com/questions/13133804/writing-driver-class-generic-for-any-database-support

Microsoft ODBC for Oracle server uid database port pwd 3 Db2 Driver IBM DB2 ODBC DRIVER server uid database port pwd now.. interface specifying the basic functionalities. interface IDb IEnumerable T Get T string query Action IDbCommand parameterizer.. interface IDb IEnumerable T Get T string query Action IDbCommand parameterizer Func IDataRecord T selector int Add string..

How to create initializer to create and migrate mysql database?

http://stackoverflow.com/questions/15796115/how-to-create-initializer-to-create-and-migrate-mysql-database

Configuration .... internal sealed class Configuration DbMigrationsConfiguration GumpDatabase public Configuration AutomaticMigrationsEnabled.. TContext IDatabaseInitializer TContext where TContext DbContext where TConfiguration DbMigrationsConfiguration TContext.. TContext where TContext DbContext where TConfiguration DbMigrationsConfiguration TContext new private readonly DbMigrationsConfiguration..

MVC 4 Edit modal form using Bootstrap

http://stackoverflow.com/questions/16011151/mvc-4-edit-modal-form-using-bootstrap

int Id get set this is only used to retrieve record from Db public string Name get set public string Age get set In your..

Is this the way to salt and store a Password in Db?

http://stackoverflow.com/questions/5431354/is-this-the-way-to-salt-and-store-a-password-in-db

this the way to salt and store a Password in Db There are seveal ways even here in SO and they all mention..

Why use System.Runtime.Caching or System.Web.Caching Vs static variables?

http://stackoverflow.com/questions/5986466/why-use-system-runtime-caching-or-system-web-caching-vs-static-variables

Category _allCategories new Lazy IEnumerable Category Db call to populate public static IEnumerable Category AllCategories..

How can I update a cell value in a dB table, using SQL Server CE and C# (Visual Studio 2010)

http://stackoverflow.com/questions/13235527/how-can-i-update-a-cell-value-in-a-db-table-using-sql-server-ce-and-c-sharp-vi

can I update a cell value in a dB table using SQL Server CE and C# Visual Studio 2010 I'm writing.. ' product.Name ' cmdUpdateDVDs new SqlCeCommand updateDVDs dBConnection dBConnection.Open cmdUpdateDVDs.ExecuteNonQuery dBConnection.Close.. ' cmdUpdateDVDs new SqlCeCommand updateDVDs dBConnection dBConnection.Open cmdUpdateDVDs.ExecuteNonQuery dBConnection.Close..

Calculate decibels

http://stackoverflow.com/questions/4152201/calculate-decibels

the level of a sound signal you should calculate the dB from the RMS value. In your sample you are looking at the absolute.. peak level. A single peak sample value determines your dB value even when all other samples are exactly 0. try this double.. 2 var decibel 20 Math.Log10 rms For 'instantaneous' dB levels you would normally calculate the RMS over a segment of..

Linq to SQL DateTime values are local (Kind=Unspecified) - How do I make it UTC?

http://stackoverflow.com/questions/823313/linq-to-sql-datetime-values-are-local-kind-unspecified-how-do-i-make-it-utc

is UTC. When I persist a property of type DateTime to the dB I use the UTC value so the value in the db column is UTC but..