Click here to Skip to main content
14,979,217 members
Everything / Database Development

Database Development

database

Great Reads

by Evoluteur
Generic REST or GraphQL endpoints for CRUD and more, written in JavaScript, using Node.js, Express, and PostgreSQL
by Rob Culhane
Dynamically add access database columns at runtime using vb.net
by Paul D. Sheriff
As more and more users interact with web applications on their mobile devices, it is becoming increasingly important for software developers to allow them to work offline; PouchDB can help.
by Nikola M. Živković
Introduction to NoSQL and Polyglot Persistence

Latest Articles

by David Wincelberg
Strings that differ by typos can be matched.
by DaveNoderer
In this article, we explore how to set up one component, an SQL pool.
by Evgeniy Gribkov
The examples of SQL Server database documentation using both the extended properties and a third-party utility.
by Private Dobbs
How to initialise a database and then automatically keep it up to date with version releases

All Articles

Sort by Score

Database Development 

Please Sign up or sign in to vote.
3 Jan 2013
WebMaster
I guess you can do by this way: At server-side, you define some web services.At Android application, you define servie that run in background, and invoke to those web servies in a interval you defined before.To invoke web services from Android application, you can use open source lib named...
Please Sign up or sign in to vote.
1 Dec 2019
Evoluteur
Generic REST or GraphQL endpoints for CRUD and more, written in JavaScript, using Node.js, Express, and PostgreSQL
Please Sign up or sign in to vote.
21 Apr 2013
Rob Culhane
Dynamically add access database columns at runtime using vb.net
Please Sign up or sign in to vote.
15 Jan 2019
Paul D. Sheriff
As more and more users interact with web applications on their mobile devices, it is becoming increasingly important for software developers to allow them to work offline; PouchDB can help.
Please Sign up or sign in to vote.
16 Oct 2017
Nikola M. Živković
Introduction to NoSQL and Polyglot Persistence
Please Sign up or sign in to vote.
26 Jul 2017
Ed Wiebe
Can't we obtain the benefit of using bitwise operators for SQL many-to-many relationships AND maintain referential integrity?
Please Sign up or sign in to vote.
19 Feb 2015
DrABELL
Technique to extend capability of standard SQL by adding the Aggregate Product Function
Please Sign up or sign in to vote.
22 Oct 2014
essentialSQL
Database normalization in SQL explained in simple English
Please Sign up or sign in to vote.
16 Apr 2013
Sergey Alexandrovich Kryukov
If your XML file is small enough to keep all the data in memory, this is a simple easy way to implement a kind of a database; and you would enjoy the huge benefits of purely object-oriented database, no mapping code. If this is not the case, however, such approach would be very awkward, and I...
Please Sign up or sign in to vote.
14 May 2015
DaveMathews
Using SIML, a language designed for Digital Assistants, to create a Natural Language Interface to an SQL Database.
Please Sign up or sign in to vote.
23 Mar 2019
Minh Tuan Do
A considerable method to speed up query running time
Please Sign up or sign in to vote.
4 Apr 2021
Rijwan Ansari
Learn about SQL Server Database Project (Template) available in VS
Please Sign up or sign in to vote.
19 Feb 2010
Md. Marufuzzaman
This is good... You can also consider this link.[^]
Please Sign up or sign in to vote.
7 Jan 2012
Sergey Alexandrovich Kryukov
I would recommend this simple, clear, short an informative CodeProject article for beginners: Using ADO.NET for beginners[^].—SA
Please Sign up or sign in to vote.
9 Feb 2014
Sergey Alexandrovich Kryukov
The question makes no sense at all, because you did not tell anything about the goals of the software you need to have.As you mentioned that you want to "create" software, it sounds like you would need to find open-source software to learn how to do programming (otherwise you would know...
Please Sign up or sign in to vote.
28 Jul 2014
DiponRoy
How to manage Entity Framework Code First in Real Time Projects
Please Sign up or sign in to vote.
27 Jan 2015
Vaclav Naydenov
Comparing the performance of two similar CRUD server apps, one written in Python and SQLAlchemy, the other in C++ and YB.ORM.
Please Sign up or sign in to vote.
29 Dec 2016
essentialSQL
Introduction to cross join - create row combinations
Please Sign up or sign in to vote.
26 Jan 2011
Sergey Alexandrovich Kryukov
This is called "Cluster analysis", your problem is probably the most elementary one.I don't know your chances to find anyone who has some ready-to-use code or algorithm, but you can start with this article, just to get and idea what's...
Please Sign up or sign in to vote.
4 Feb 2012
RasikaLB
2 alternatives  
You can find queries to find a specific string from MSSQL Server
Please Sign up or sign in to vote.
20 Jun 2013
Levente Kupás
If you have big reports which run slowly, you may use this T-SQL based engine to speed-up them.
Please Sign up or sign in to vote.
19 Jun 2015
ergohack
System.Data.SQLite is great, but was missing some BLOB support. Switching to the native source project was easier than expected and provided significant functionality benefits.
Please Sign up or sign in to vote.
27 Jun 2016
Val Okafor
Realm Database Tutorial For Android – Part 1
Please Sign up or sign in to vote.
8 Jan 2019
RickZeeland
Instead of sending lots of commands you could try sending one command using the "IN" clause, see example here: SQL IN Operator[^]
Please Sign up or sign in to vote.
21 May 2021
rev78
Simply bypass the 255 columns in MFC CRecordset
Please Sign up or sign in to vote.
15 Mar 2011
Sergey Alexandrovich Kryukov
I'm sure the only valid answer would be this: http://en.wikipedia.org/wiki/Comparison_of_database_tools[^].That leaves for your choice from this table, which is entirely defined by your purpose :-)Honestly.—SA
Please Sign up or sign in to vote.
25 May 2011
Manfred Rudolf Bihy
DBMS are relational and so should be your data model.This is what I would do:TABLE_WebPage------------integer id; //primary auto increment keyvarchar(50) name; //maybe UNIQUE index on that onevarchar(300) url;...TABLE_PageMetaTag------------------integer id;...
Please Sign up or sign in to vote.
6 Jul 2012
OriginalGriff
That's going to depend on what you have them as in your app. If they are images as seems likely, then varbinary(max) would be a good choice. If they need additional info then you might want to store them in two fields to make separating them before use easier.
Please Sign up or sign in to vote.
18 Aug 2012
_Amy
Hi,Try adding this when login is successful:if (dr.HasRows == true){ MessageBox.Show("Login Successfull", "Login Information"); this.Hide(); //This will hide your current form MyWinForm1 M1 = new MyWinForm1();//Create the object of your second form ...
Please Sign up or sign in to vote.
3 Nov 2014
essentialSQL
Database Third Normal Form explained in simple English
Please Sign up or sign in to vote.
19 Jan 2016
essentialSQL
How to Write SQL – Understand Database Table Meanings and Relationships – Step 1
Please Sign up or sign in to vote.
10 Feb 2016
Jesus Carroll
SQL Server 2016 introduces support for system-versioned temporal tables as a database feature that brings built-in support for providing information about data stored in the table at any point in time rather than only the data that is correct at the current moment in time.
Please Sign up or sign in to vote.
31 Jan 2017
#realJSOP
Using common table expressions to build data from thin air.
Please Sign up or sign in to vote.
30 Dec 2019
Dathuraj Pasarge
Database mirroring setup without any DBA effort - on every new database creation
Please Sign up or sign in to vote.
26 Sep 2010
Henry Minute
Well, yes and no. :) For example in an employee table that includes a manager attribute, one solution to discovering the hierarchy is to use a self join which can result in a cartesian product.So yes, because there would only be one table. No because it is being treated as two tables for...
Please Sign up or sign in to vote.
6 Jan 2011
OriginalGriff
Yes. Sort of.You would have a ConnectionString which supplies the address and login details for the database, but after that you need to supply code or browser html to access the database itself and enter / extract the records.Note I would suggest that for the DB you look at MsSql or...
Please Sign up or sign in to vote.
20 Jan 2011
OriginalGriff
Try:INSERT INTO "table_name" ("column1", "column2", ...) VALUES ("value1", "value2", ...)as your SQL command. By preference, do it using Parameterised queries:cmd = new SqlCommand("INSERT INTO PatientDetails (Name, HeartScore) VALUES (@NAME, @HEARTSCORE)",...
Please Sign up or sign in to vote.
9 Feb 2011
Espen Harlinn
I think this is what you are looking for:Limiting Result Sets by Using TABLESAMPLE[^]RegardsEspen Harlinn
Please Sign up or sign in to vote.
15 Feb 2011
Sharma Richa
SELECT TOP(2) * FROM [tablename] ORDER BY Id DESCsecond isSELECT TOP(5) * FROM [table] ORDER BY salary DESC
Please Sign up or sign in to vote.
24 Mar 2011
Espen Harlinn
Take a look at:WPF DataGrid Practical Examples[^]RegardsEspen Harlinn
Please Sign up or sign in to vote.
6 Apr 2011
Dylan Morley
SQL Express 2005 should be fine for what you're trying to achieve. What you need to think about here is how the SQL instance is exposed over the network and how clients are going to connect to it. This is going to be the same issue for any RDBMS you might choose, such as MySql[^]For...
Please Sign up or sign in to vote.
6 Apr 2011
Wendelius
Hi,The choice depends on many different factors, like:- performance requirements- underlying OS- upgradability- licensing issues (possible existing licenses at client etc)- estimated size in 1,2,5 years- number of (concurrent) users/transactions etcIf you were unable to...
Please Sign up or sign in to vote.
18 Apr 2011
OriginalGriff
Do you want the bad news? Sorry, but SQL does not behave the same as C, C++ and C#. In those, AND clauses are always executed left - to right, and any false result will abort the operation (called "evaluation short-circuiting"). SQL does not do that. What it does do is more complex. There is a...
Please Sign up or sign in to vote.
19 May 2011
CS2011
There is no hard and fast rule for this. This depends on many criteria like what is database (i.e Oracle, DB2,Sql server etc ) and what is the operation performed inside the SP(insert/update or just a select). In case of select opration inside SP the SP may execute over multiple threads(this is...
Please Sign up or sign in to vote.
24 Aug 2011
Herman<T>.Instance
the value of FoodName in c# is NULL. How is FoodName set when not found in item?read my article about disadvantages of sqlparameters.Disadvantages of SqlParameters Turned into Advantages[^]you need somethind like this:private static void CheckParameters(List...
Please Sign up or sign in to vote.
13 Sep 2011
Mehdi Gholam
The general principal to keep in mind is don't make more work for yourself than is absolutely necessary. Most clients and users don't care about how and where their data is stored unless it is safe and consistent. Rarely to client insist on using a specific type of database engine.In...
Please Sign up or sign in to vote.
24 Sep 2011
Sander Rossel
I partly agree. I do not quite get your "SP's are not faster" point. You make Command Objects with query strings? You pass to them Parameter Objects so you have a parameterized query? If you go at it that way I can imagine there is no speed penalty, since that approach simply executes the query...
Please Sign up or sign in to vote.
6 Feb 2012
Espen Harlinn
Have a look at:WPF: A* search[^]It does most of what you actually need. Best regardsEspen Harlinn
Please Sign up or sign in to vote.
26 Nov 2013
Maciej Los
I would suggest you to use Stored procedure instead command text in a code behind.Please, see: Return Data from a Stored Procedure[^]How to: Execute a Stored Procedure that Returns Rows[^] SP should looks like this one:SELECT *FROM [users]WHERE [name]=@usernameBy The Way: Do...
Please Sign up or sign in to vote.
7 May 2014
Kornfeld Eliyahu Peter
You can use DBTIMEZONE or SESSIONTIMEZONE for that...http://docs.oracle.com/cd/B19306_01/server.102/b14200/functions143.htm[^]http://psoug.org/definition/DBTIMEZONE.htm[^]
Please Sign up or sign in to vote.
30 Jul 2014
DiponRoy
How to handle database scheme changes with normal SQL scripts, without migration in Entity Framework code first
Please Sign up or sign in to vote.
4 Sep 2014
Wendelius
This sounds a bit like a homework....Anyhow, there are quite a few differences. To name some from the top of my head:the amount of columns is differentthe order of the same columns returned may be differentthe second one may fail because of wrongly typed column namethe second one may...
Please Sign up or sign in to vote.
21 Oct 2014
essentialSQL
Database Second Normal Form explained in simple English
Please Sign up or sign in to vote.
7 Sep 2015
Sander Rossel
The seventh in a series on MEAN web development.
Please Sign up or sign in to vote.
11 Jul 2016
Jesus Carroll
Despite the references of several sources of unattended installation of Microsoft SQL Server Database Engine, in this article describes a script tested in real production environments and it can be used with minimal or - perhaps - no modifications.
Please Sign up or sign in to vote.
14 Jul 2016
OriginalGriff
If I do a dummy setup and test on your code:public class MachineAD { public string Name; public int ID; }public class Machine { public string BarCode; }public class MachineUnified { public int IDad; public string NameFromAD; public...
Please Sign up or sign in to vote.
17 Nov 2016
Richard Deeming
As I suspected, you're sharing a single OleDbConnection instance across multiple calls. All of the errors you're describing are caused by multiple threads trying to access that single object at the same time.For example:Thread 1: Gconn = New OleDb.OleDbConnectionThread 1:...
Please Sign up or sign in to vote.
18 Dec 2016
NightWizzard
Convert amounts to their spoken equivalents
Please Sign up or sign in to vote.
8 Feb 2017
#realJSOP
I would create two tables - One with patient identifying information, and the other with all other fields.This will make it easier to satisfy HIPAA requirements later.Table PHI:PatientID (this should be the biggest integer type supported by your...
Please Sign up or sign in to vote.
24 Feb 2019
CHill60
It is highly unlikely that you need to use a loop of any kind. My article Processing Loops in SQL Server[^] offers several worked examples with alternatives to loops. In this case you need to identify the individual timeslots that exist on the production table e.g. create table #timeslots (id...
Please Sign up or sign in to vote.
6 Jul 2019
MadMyche
There are most likely multiple errors in your statement. The main issue I see is a major vulnerability known as SQL Injection. You should NEVER EVER piece user entered data asstrings together to form a SQL statement. The proper way to add variables into a command is via Parameters string sQry =...
Please Sign up or sign in to vote.
18 Dec 2009
Vinayaka Krishna Shenoy
Hello,Ye...
Please Sign up or sign in to vote.
25 Oct 2010
Nish Nishant
There are two approaches to take:1) Store the mp3 content directly in the DB. This is probably not a great idea. Most databases will have some kind of blob field type that you can use for this.2) Store file paths to the actual mp3 content, which will remain as physical files on a server.
Please Sign up or sign in to vote.
13 Jan 2011
Simon_Whale
import the excel data and run an outer join queryAccess Outer join query[^]
Please Sign up or sign in to vote.
17 Jan 2011
OriginalGriff
It depends. Normally, you would install SQL Server in one PC, and the others then connect to it over the network. The clients then need no extra installation unless they are editing teh database directly, rather than via your app.If you are using SQL server as a standalone database that...
Please Sign up or sign in to vote.
9 Feb 2011
Nish Nishant
See http://stackoverflow.com/questions/848872/select-n-random-rows-from-sql-server-table[^]
Please Sign up or sign in to vote.
24 Feb 2011
Espen Harlinn
CREATE TABLE Employee(Id bigint identity not null primary key,Name nvarchar(255) not null,Salary DECIMAL not null)goINSERT INTO Employee(Name,Salary) VALUES('Emp1',100001)goINSERT INTO Employee(Name,Salary) VALUES('Emp2',100002)goINSERT INTO Employee(Name,Salary)...
Please Sign up or sign in to vote.
10 Mar 2011
fjdiewornncalwe
For starters, don't try to mix up your logic. Separate what you want to do in your UI from what you want to do in your application logic. What I mean is that you should treat your "Yes" or "No" click logic and what happens on the form separately from the logic that you use to write information...
Please Sign up or sign in to vote.
14 Mar 2011
Manfred Rudolf Bihy
Of course you can have a table like that! Let's call the relation (table) "DirectAncestors" for example:Table DirectAncestors:PersonId bigint; (Foreign key to table Person.ID)FatherID bigint; (Foreign key to table Person.ID) MotherID bigint; (Foreign key to table Person.ID)The...
Please Sign up or sign in to vote.
6 Apr 2011
Sergey Alexandrovich Kryukov
You already got an overview of the criteria, see the Answer by Mika.Now, you have something to select from and perform comparison. See http://en.wikipedia.org/wiki/Comparison_of_relational_database_management_systems[^] and...
Please Sign up or sign in to vote.
7 Apr 2011
OriginalGriff
It isn't impossible to formulate such queries, but it is very difficult to design a user interface that allows non-technical people to construct them, without scaring off the idiots that will by any old tat on eBay average eBay user.Think about it: Google lets you do some of this, with...
Please Sign up or sign in to vote.
22 Apr 2011
Abhinav S
This could [^]help you get started.This[^] might also help.
Please Sign up or sign in to vote.
15 May 2011
Wonde Tadesse
It is not clear how and what framework you used to implement your application. But, if you are comfortable working with ADO Entity Framework[^] or NHibernate[^], such kind of query propagation is really easy. Just explore them.I hope this helps you well.
Please Sign up or sign in to vote.
19 May 2011
walterhevedeich
Put the columns that are not inside an aggregate function in the GROUP BY clause. Like this for example."select email,name,mobile,b.custrefno,SUM(b.paidamount) as paidamount from paym b,addcust a where b.custrefno=a.custrefno GROUP BY b.custrefno,email,name,mobile";
Please Sign up or sign in to vote.
25 May 2011
Not Active
Need to add more words because this won't except a simple, yes
Please Sign up or sign in to vote.
8 Jun 2011
OriginalGriff
Change comm = new OdbcCommand("select * from utilisateur where login=?", cn); comm.Parameters.Add("login", login.Text);To comm = new OdbcCommand("select * from utilisateur where login=@LI", cn); comm.Parameters.Add("@LI",...
Please Sign up or sign in to vote.
8 Jun 2011
Sandeep Mewara
Adding to other answer:" System.NullReferenceException: Object reference not set to an instance of an object."This simply means that you are trying to access a property of an object that is null. Using Visual Studio DEBUGGER will tell you exact line and the object that is null and thus...
Please Sign up or sign in to vote.
1 Aug 2011
Shameel
You have not mentioned what database it is. If it is SQL Server (as you have used SqlConnection class) then, as digimanus suggested, rewrite your query asSELECT TOP 1 * FROM [User]There is no LIMIT clause in MS SQL Server.If you database is indeed MySQL, then use the appropriate Library...
Please Sign up or sign in to vote.
1 Aug 2011
Wonde Tadesse
This probably happens due to LIMIT key word. If you are using SQL Server, it might not support the key word. Take a look at this Channel 9 discussion. SQL Server and LIMIT clauses on SELECT statements[^]
Please Sign up or sign in to vote.
27 Aug 2011
Shameel
Write a Stored Procedure that does your work and execute it at regular intervals using SQL Server Job[^].
Please Sign up or sign in to vote.
2 Sep 2011
Wendelius
This looks like a bad design. Instead of having years and values as separate columns, you should use a table with two columns:- Year- ValueSo the data in the table would be:Year Value---- -----2010 1552011 1192012 145With that, you would query for proper year always from...
Please Sign up or sign in to vote.
2 Sep 2011
Abhinav S
StepsStep 1) You need to host the database in central server / location and allow client programs to access it.Step 2) You will need to make sure all clients have network access to this location.Step 3) To do this, you will need to setup a database connection, say an ODBC setup, on every...
Please Sign up or sign in to vote.
7 Jan 2012
uspatel
if you want to create database using C#,see thisCreate a SQL Server Databaseuse ADO.net for database connectivityADO.Netotherwise sql server mgmt. studio is easiest way to create database and tables.see this http://www.sqlserver2005tutorial.com/
Please Sign up or sign in to vote.
14 Jan 2012
OriginalGriff
Try: using (SqlConnection con = new SqlConnection(strConnect)) { con.Open(); using (SqlCommand com = new SqlCommand("SELECT iD, description FROM myTable", con)) { using (SqlDataReader reader =...
Please Sign up or sign in to vote.
12 Feb 2012
Mycroft Holmes
Ah it is the automated issue that is the problem.I would use a SQL server job that runs periodically to check for expired data events and generate the email and send it via SQL mail and SMTP.Either that or use a timer in your c# app to do the same thing.You could also write a service...
Please Sign up or sign in to vote.
15 Feb 2012
Ed Nutting
1 alternative  
Hi all,I have a Microsoft SQL Server database and I am using LINQ to SQL to interact with it in my ASP.Net C# 4.0 Website. What I would like to do is have a method that before a query is submitted to the database, grabs the command that will be sent and allows me to look at it. Basically, I...
Please Sign up or sign in to vote.
18 Apr 2012
Mohammad A Rahman
Hope it helps The Connection String Reference[^]:)
Please Sign up or sign in to vote.
29 Apr 2012
Espen Harlinn
One place to start is here: WCF Data Services[^]Then there is Introduction to ADO.NET Data Services/RIA Services[^] By Sacha Barber[Update]Try replacing localhost with (local)Data Source=(local)Best regardsEspen Harlinn
Please Sign up or sign in to vote.
29 Apr 2012
Sandeep Mewara
Generally, it is surface area configuration error or sql service configuration issue. Have a look at this thread for potential reasons and resolutions: Resolving A network-related or instance-specific error occurred while establishing a connection to SQL Server[^]If needed, See steps for...
Please Sign up or sign in to vote.
7 May 2012
OriginalGriff
Why are you using an SqlConnection to connect to an SDF file? Why not use an SqlCeConnection?SqlCeConnection connection = new SqlCeConnection();connection.ConnectionString = @"Data Source=D:\NewCode\DataBaseWin.sdf;Integrated Security=SSPI";connection.Open();
Please Sign up or sign in to vote.
15 May 2012
Mohamed Mitwalli
Hi , Check this using ( SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["testConnectionString"].ConnectionString)) { using(SqlCommand cmd = new SqlCommand("SELECT TABLE_NAME FROM...
Please Sign up or sign in to vote.
24 May 2012
Wendelius
Your code looks valid at a glance. When you call the ExecuteNonQuery, take the return value into a variable. So modify your code to...int rowsaffected = command1.ExecuteNonQuery();...Now using debugger, check what is the value of rowsaffected. It should be the total amount of rows.If...
Please Sign up or sign in to vote.
24 May 2012
Maciej Los
The command DELETE FROM Onlineis correct, but i prefer to use TRUNCATE[^] (see my comment to Mark Nischalke anser).In my opinion, the problem is in the below procedure: private void Form1_FormClosing(Object sender, FormClosingEventArgs e) { StopServer(); ...
Please Sign up or sign in to vote.
15 Jul 2012
OriginalGriff
As Wes says - it's pretty obvious! But please, please, don't do it that way! Do not concatenate strings to build a SQL command. It leaves you wide open to accidental or deliberate SQL Injection attack which can destroy your entire database. Use Parametrized queries instead: ...
Please Sign up or sign in to vote.
16 Jul 2012
Albert Holguin
For inventory control, I would definitely go towards an actual database. You said it yourself, it's going to get large fast, so relational databases are the best method of storing, recalling, and searching through large amounts of data. It might complicate things up front but it's definitely...
Please Sign up or sign in to vote.
20 Jul 2012
Sandeep Mewara
No one will do that. It's your application - you know the requirements and needs of the application. Catch your senior to design or get help in design. In case you are not aware of things in hospital management, for general case you can download samples from here and learn it: Free Hotel...
Please Sign up or sign in to vote.
25 Aug 2012
nitin bhoyate
sure you can do that.Steps: 1)Create connection object2) open connection3) create sqlcommand to read the data by passing the select query4)execure reader5) then labelname.text=Reader["Columnname"].ToString();try{ SqlDataReader myReader = null; SqlCommand ...
Please Sign up or sign in to vote.
17 Jan 2013
Vyacheslav Voronenko
According to Microsoft Research study, objects smaller than 256K are best stored in a database while objects larger than 1M are best stored in the filesystem. Between 256K and 1M, the read:write ratio and rate of object overwrite or replacement are important...
Please Sign up or sign in to vote.
23 Jul 2013
Guirec
The simple answer is : you need a 3rd table StudentHasBorrowedBook with 2 PKs colums Roll number and Book number.That said the question might become much more complicated if you have 2 prints of the same 'Book'
Please Sign up or sign in to vote.
14 Aug 2013
Ron Beyer
ExecuteNonQuery returns an integer of the number of rows/records affected by the operation. Instead of using ExecuteNonQuery you need to use ExecuteReader.ExecuteNonQuery -> Used for Updates, Inserts and Deletes mostly.ExecuteReader -> Returns a data reader that can load records, for...
Please Sign up or sign in to vote.
2 Mar 2014
ASP.NET Community
In my case, I use  a FileUpload Control(Id:->FileUpload1), an ImageButton(ImageButton1) or you can use the Image,  a Button Control(Id:->Updatebttn)
Please Sign up or sign in to vote.
31 Dec 2013
Dave Kreskowiak
Probably not. Even Lightswitch requires you to write some code.
Please Sign up or sign in to vote.
22 May 2014
Maciej Los
The answer is: No! (for separating Date into another table and Time for another table!)Use one table and proper data type[^] (datetime, datetimeoffset).
Please Sign up or sign in to vote.
11 Aug 2014
Thanks7872
See this : http://sqlfiddle.com/about.html[^]. Is this what you are looking for?
Please Sign up or sign in to vote.
13 Aug 2014
Sergey Alexandrovich Kryukov
Your dad needs to install the SQL server, period. Moreover, even though deployment of database service with the application is the acceptable practice, it all heavily depends on licensing models, actually available licenses and maybe business setting. Therefore, the choice #1 is still just...
Please Sign up or sign in to vote.
4 Sep 2014
Gihan Liyanage
Say google first.. When you have an issue or doubt Your solution is here.Select * Vs Select Column Name[^]
Please Sign up or sign in to vote.
22 Oct 2014
essentialSQL
How to combine table rows using UNION in SQL Server
Please Sign up or sign in to vote.
3 Nov 2014
Maciej Los
The proper statement is:SELECT *FROM tbl_RecordWHERE [Date] BETWEEN '2014-09-03' AND '2014-11-03'Symbols are needed when you omit BETWEEN statement.SELECT *FROM tbl_RecordWHERE [Date] >= '2014-09-03' AND [Date]
Please Sign up or sign in to vote.
26 Feb 2015
Maciej Los
Client computers does not need Access to be installed. .Net libraries support many database providers. See: .NET Framework Data Providers[^]To be able to use MS Access as a database, you need to use OLEDB drivers. That's all. Note: please, carefully read Sergey's answer. There is a lot of...
Please Sign up or sign in to vote.
10 Apr 2015
Rajeesh Madambat
Refer and write your own business logic in C# and add it to SSIS script task.
Please Sign up or sign in to vote.
29 Apr 2015
Dave Kreskowiak
You really can't do that because your code is not executing the SQL query. The database engine parses and executes the query. Unless you're writing the database engine itself, using CUDA will not help you.Using the GPU is suited for solving massively parallel problems such as applying a...
Please Sign up or sign in to vote.
14 Jul 2015
OriginalGriff
No, not significantly. It's possible to use SELECT to return all the table names in a DB.To avoid SQL Injection, use parameterized queries instead of string concatenation.
Please Sign up or sign in to vote.
14 Oct 2015
Terence Wallace
Alternative VB.NET version of "LiteDB - A .NET NoSQL Document Store in a single data file"
Please Sign up or sign in to vote.
28 Oct 2015
Zoltán Zörgő
Wait a second.1) IIS does not connect to any RDBMS, except for storing session state - it is only a setting you can use in your application2) SQL Express does not enable TCP/IP connector by default, you need to enable it[^].3) For this to work, you need to have specific port level...
Please Sign up or sign in to vote.
20 Feb 2016
CHill60
See the comment from Sinisa Hajnal.They have provided a few reasons why a database is better than excel. There are several more, not least the fact that you would have to have Excel drivers installed on your server in order to access the data. That can be an expensive overhead that is just...
Please Sign up or sign in to vote.
26 Feb 2016
Pavel Sinkevich
How to programmatically change schema name in database project before deployment
Please Sign up or sign in to vote.
8 Sep 2016
Dave Kreskowiak
Restore from backup. There is no recovery.
Please Sign up or sign in to vote.
24 Dec 2016
OriginalGriff
1. Who creates a database? How is it created? Where is it created? And, what does it look like?Developers, mostly - often in their guise as "data administrators". Basically, we do it - because while it's actually pretty simple to "create a database" getting it right is a lot harder. How do...
Please Sign up or sign in to vote.
8 Feb 2017
Maciej Los
There's not enough information about medical data to determine how many tables you have to create.At this moment i can say, you have to create at least 2 tables. One for patient data and second for medical data, but it depends on what data have to be stored there.I'd suggest to read about...
Please Sign up or sign in to vote.
22 Sep 2017
#realJSOP
It doesn't always happen the way you expect.
Please Sign up or sign in to vote.
21 Sep 2018
Maciej Los
You've got few ways to resolve your issue. A. download and install Microsoft SQL Server Migration Assistant 7.10 for Access[^]; Then follow the steps of wizard; B. you can use BULK command[^] C. you can use SQLBulkCopy class[^]; It's quite easy:   1. Connect to MS Access database   2. Create...
Please Sign up or sign in to vote.
20 Jan 2019
Paul D. Sheriff
In this 2nd part of my series on PouchDB, you learn how to perform multi-document inserts and reads.
Please Sign up or sign in to vote.
6 Jul 2019
User 11060979
The biggest mistake is to build an SQL statement directly with user input. Use always parametrized queries to avoid SQL Injection. Note: For your code at the moment this is not that critical, because you are using the combobox index. The mistake in your case is, that you join the strings...
Please Sign up or sign in to vote.
13 Jan 2020
koolprasadd
New features of SQL 2019
Please Sign up or sign in to vote.
10 Dec 2019
Maciej Los
The error message is not related to the subject of "trailing zeros". I'd suggest to read this: ALTER TABLE ALTER COLUMN [access-id] failed because one or more objects access this column[^]
Please Sign up or sign in to vote.
27 Jan 2021
Wendelius
One possible reason is that the DSN you have used (TEST) is defined only for the user (you), not as system DSN. So if you're running the service under different user account, it cannot see the DSN. In ODBC admin tool, try defining the data...
Please Sign up or sign in to vote.
20 May 2010
pcowie6680
3 alternatives  
Hi,We have a database application that maintains inventory data for shade tree populations (location / GIS data, site characteristics, tree attributes, etc.) and manages their maintenance via an integrated service request and work order system. The UI and data provider layer are vb.net 2010...
Please Sign up or sign in to vote.
7 Jun 2010
PSK_
This code seems to be ok. Check you db paramete and parameter type and also check your stored procedure. You might be using incorrect type or assigning incorrect value to the column.
Please Sign up or sign in to vote.
26 Aug 2010
tarun_j200
Also use either this one:SELECT OBJECT_NAME(SYSINDEXES.id), SYSINDEXES.rowcntFROM SYSINDEXES INNER JOIN SYSOBJECTS ON SYSINDEXES.id = SYSOBJECTS.idWHERE SYSINDEXES.indid
Please Sign up or sign in to vote.
11 Dec 2010
Sandeep Mewara
Here, try this:SELECT DATEPART(quarter, OrderDate) --OR SELECT DATEPART(qq, OrderDate) --OR SELECT DATEPART(q, OrderDate)
Please Sign up or sign in to vote.
19 Feb 2015
DrABELL
Generate large data series by using Cartesian Product and small data table
Please Sign up or sign in to vote.
24 Dec 2010
Shahriar Iqbal Chowdhury/Galib
Reset PLSQL sequence value
Please Sign up or sign in to vote.
3 Jan 2011
J-Cod3r
1 alternative  
I am challenged with the following problem and in desperate need of someone who can assist me in finding a solution, that will work in my environment. Problem description:We have 4 environments (DEV, TEST, QA and Live) at my place of work, all MSSQL. We need to move data between these...
Please Sign up or sign in to vote.
6 Jan 2011
#realJSOP
SQL Server 2008. What app platform you use is dependent on what you need - a web app, or a desktop app, as well as what your target users are - Windows or all platforms. If you need a web app and you're targeting all platforms, go ASP.Net. Personally, I would choose Silverlight because it...
Please Sign up or sign in to vote.
20 Jan 2011
Nish Nishant
Here are some links:http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.aspx[^]Beginners guide to accessing SQL Server through...
Please Sign up or sign in to vote.
26 Jan 2011
Huisheng Chen
3 alternatives  
We have a problem, we have a series of data, please check the graph below. Basically it's a 24 hours data, we want to automatically split the 24 hours to a few sections according to the similar values.for example, we can see that from 0am to 7am the values are more or less the same, we mark...
Please Sign up or sign in to vote.
27 Jan 2011
Espen Harlinn
Here is a thought:Use Bollinger Bands[^]Calibrate to fit your needs and monitor the rate of change for the moving average. This should enable you to detect some of the interesting changes to your data. Comparing the input values against +/- the standard deviation multiplied by a calibrated...
Please Sign up or sign in to vote.
6 Feb 2011
Espen Harlinn
Don't use access - ever! If you are considering Sql CE - take a look at SQLite[^] - and don't use either if you can avoid it, go for a "real" RDBMS like: SQL Server 2008 - you are free to deploy SQL Server 2008 Express with your projects. Firebird[^] can be deployed as a server or in...
Please Sign up or sign in to vote.
11 Feb 2011
Smitha Nishant
This article shows how it's done with ASP.NET (sample code included):http://www.aspnettutorials.com/tutorials/database/searchwithstring-csharp.aspx[^]
Please Sign up or sign in to vote.
12 Feb 2011
Steve Wellens
Do you have two databases? Could you be inserting to one but looking at the other?
Please Sign up or sign in to vote.
17 Feb 2011
dontumindit
While dealing with databases, sometimes there is a need to get a list of tables in the application
Please Sign up or sign in to vote.
24 Feb 2011
OriginalGriff
Firstly, either you will need two '\' characters together or an '@' in front of the string:string cs = "Data Source=MASTER\\MASTER;Initial Catalog=FilmDB;Integrated Security=True;Pooling=False";string cs = @"Data Source=MASTER\MASTER;Initial Catalog=FilmDB;Integrated...
Please Sign up or sign in to vote.
11 Mar 2011
fjdiewornncalwe
If you need a process to run at a system level like this you should investigate creating a windows service to do this for you. The windows service can run in the background and do what you want it to.
Please Sign up or sign in to vote.
11 Mar 2011
Espen Harlinn
On unix/linux you use cron: http://aplawrence.com/BDD/bbcronbasics.html[^]On windows you create a service as Marcus suggested - or use the windows task scheduler http://en.wikipedia.org/wiki/Task_Scheduler[^] to schedule anything that can be executed.RegardsEspen Harlinn
Please Sign up or sign in to vote.
16 Mar 2011
Espen Harlinn
You can use C++ with most database engines, to determine what database engine is right for you, you need to look at it's features and behaviour.Does the engine need to handle concurrency (multiple concurrent users)?Will you need support for large objects?Will your solution involve...
Please Sign up or sign in to vote.
30 Mar 2011
sumit.itsforyou
1 alternative  
Hello Every One, I have a problem in retrieving records from SQL Server compact edition database.I have two tables:-1. Name= GroupTask , PK=GTaskIDGTaskIDGTaskSubjectGTaskBodyGTaskDeadline1001Do SomthingBla bla bla...3/31/20112.Name=GroupTaskDetails , FK=GTaskID...
Please Sign up or sign in to vote.
13 Apr 2011
Peace ON
I have come across few link while googling. Find your answer in following links.I found one nice article in code project itself about Custom Member Provider for Asp.Net MVC...
Please Sign up or sign in to vote.
12 Apr 2011
Oshtri Deka
First you must find particular row, one way or another. I'll assume you know row's ID (PK) or index in table and that you don't use typed dataset.//find your row by IDDataRow myRow = oDS.Orders.Rows.Find(rowID);or//find your row by indexDataRow myRow =...
Please Sign up or sign in to vote.
12 Apr 2011
Amit Kumar Tiwari
Study about SQL Membership to get the basics and then follow the link http://www.shiningstar.net/aspnet_articles/customprovider/CustomProvider.aspx[^] to create custom membership.
Please Sign up or sign in to vote.
16 Apr 2011
OriginalGriff
If you use MSSQL in your application, then your user must have access to SQL Server to use it. However, it is not normal to ship SQL Express with your app setup - the user may already have SQL Server installed on an existing computer.If this is a single user database system, consider not...
Please Sign up or sign in to vote.
16 Apr 2011
Abhinav S
I would think an integer may be useful if you need to perform any sort of calculations / sorting on year.But finally it could depend on what kind of operations you might intend to perform on the date field in the future.
Please Sign up or sign in to vote.
6 May 2011
Wonde Tadesse
It is difficult to answer your question with this code snippet. You need to elaborate more!. But what I will suggest you to use Debugging technique[^] efficiently.
Please Sign up or sign in to vote.
15 May 2011
Kim Togo
You have to rewrite the SQL statement toSELECT *FROM tblusersWHERE(business_name LIKE "%search_customer%" OR emal LIKE "%search_customer%")AND user_status = "active"ORDER by business_name ASCUse are missing "(" and ")" between business_name and emal.Your WHERE statement is...
Please Sign up or sign in to vote.
22 May 2011
OriginalGriff
The first thing you need is to keep a list or similar of the bugs you are creating as you read them from the DB. Otherwise you cannot add them to anything!I would suggest at class level you use a List:// Class: BugFinderprivate List myBugs;public void GetBugs() ...
Please Sign up or sign in to vote.
25 May 2011
The_Real_Chubaka
1 alternative  
Hello,I am supposed to take data from wikipeadia dump or freebase dump or dbpedia.I am then supposed write code that gives as output what every datum in that database is. eg: name of a person or a bussines, address,... It does not matter in what language i write the code but, I’m only...
Please Sign up or sign in to vote.
5 Jun 2011
Kim Togo
When you have opened the database and have your SELECT statement ready, use a DataTable[^] to hold all informations from the database.sqlConnection.Open();SqlDataAdapter dataAdapter = new SqlDataAdapter("SELECT * FROM tbl WHERE id=42", sqlConnection);DataTable result = new...
Please Sign up or sign in to vote.
21 Jun 2011
parmar_punit
SqlCommand cmd = new SqlCommand("SELECT COUNT (*) FROM singleinput", con);int count = 0;try{ con.Open(); object total = cmd.ExecuteScalar(); if (total != null) { try { count = Convert.ToInt32(total); } catch { ...
Please Sign up or sign in to vote.
21 Jun 2011
Anudeep Jaiswal - MCA
You Can Use Assign label1.text = Com1.Executescalar(Query).ToString();Plz Check
Please Sign up or sign in to vote.
7 Jul 2011
Wonde Tadesse
Bigint size is -2^63 through 2^63-1. You are quite far away to reach here. There is no worry about it.
Please Sign up or sign in to vote.
31 Jul 2011
Abhinav S
e,@Height,@Wei...
Please Sign up or sign in to vote.
31 Jul 2011
BobJanova
Some of those table or column names are probably reserved words in your database engine. (User and Name I would be suspicious of.) You have to escape those in the query, either like `name` for mySQL or [name] for SQL server (if I'm remembering that right).
Please Sign up or sign in to vote.
31 Jul 2011
Mahendra.p25
try to find out in the following wayINSERT INTO [User] (Name,Age,Height,Weight,Weight_Target) VALUES (@Name,@Age,@Height,@Weight,@Target)
Please Sign up or sign in to vote.
30 Aug 2011
OriginalGriff
Depending on the database system you are planning to use, it may be the best way.If you use MySQL or MsSQL, then no - bad idea.If you use SqLite or SqlCE then yes - good idea. I don't have experience with SqLite, but SqlCE is a stand alone, cut down version of MsSQL which is intended for...
Please Sign up or sign in to vote.
30 Aug 2011
#realJSOP
You can script the the database to a sql file, and then have the installer (or the user) shellexecute the sql file. Of course, SQL Server must be installed on the system for that to work.
Please Sign up or sign in to vote.
2 Sep 2011
Wendelius
To add to Abhinav's answer, since this is an Access project, the client needs to have direct access to the database files. This means that you most likely have to share the folder where the files are located.For the future. If you plan to have more clients and you want to achieve more secure...
Please Sign up or sign in to vote.
13 Sep 2011
Abhinav S
If you can write your code generic enough to replace one db with another, then this would add to the sale value of the application. One client can use, say, MySQL while another client can use SQL Server with the same application.However, do this only when you think it is worth the effort....
Please Sign up or sign in to vote.
13 Sep 2011
Dr.Walt Fair, PE
Your question is too general to give a specific answer. It depends on what the databases do. I have cases where there is a project database (different for each project), supplemented by a database containing standard information. It would be a major hassle to combine them into a single database...
Please Sign up or sign in to vote.
13 Sep 2011
Ger Hayden
Do you mean two databases simultaneously? Let me give a real world example.I once worked for a company that supplied hospital software, which had two databases (both Oracle), one at regional level where things like GP and GP Practices were stored, and the other at hospital level where data...
Please Sign up or sign in to vote.
25 Sep 2011
ludovicianul
The easiest and elegant way to read images from the database and display them in the UI.
Please Sign up or sign in to vote.
26 Dec 2011
AnnieMacD
Assuming your EDM is dbentity:using (var myContext = new dbentity()){ var person = new Person(); // add some stuff here to populate myContext.Person.AddObject(person); myContext.SaveChanges();}If 'person' is an object in the entity model, that's all that's required to...
Please Sign up or sign in to vote.
14 Jan 2012
thatraja
Big deal?Connecting to SQL Server Using ADO.NET[^]SQL Server and ADO.NET[^]
Please Sign up or sign in to vote.
3 Feb 2012
Kanasz Robert
Hi,try this one:insert into MyTable3(Field1, Field2) (select a.Field1, b.Field from MyTable2 as a, MyTable3 b where [EXPRESSION])http://dev.mysql.com/doc/refman/5.0/en/insert-select.html[^]RegardsRobert
Please Sign up or sign in to vote.
24 Feb 2012
Not Active
This could easily be done with a stored procDECLARE @invnum INT;SELECT @invnum = MAX(InvoiceNumber) FROM InvoiceTable@invnum = @invnum + 1INSERT INTO InvoiceTable (InvoiceNumber) VALUES (@invnum)RETURN @invnumusing(SqlCommand cmd = new SqlCommand("proc name",...
Please Sign up or sign in to vote.
6 Mar 2012
walterhevedeich
Since you have little experience on the database part, you might want to start by learning ADO.Net[^].
Please Sign up or sign in to vote.
13 Mar 2012
OriginalGriff
You can't, unless he tells you the encryption key and you use the same or equivalent software.That is, after all, the whole point of encryption...
Please Sign up or sign in to vote.
11 Apr 2012
sravani.v
Refer these may give you some...
Please Sign up or sign in to vote.
12 Apr 2012
Wes Aday
using System.Data.OleDb; string connection = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=yourpath\10_stars.accdb"; using (OleDbConnection con = new OleDbConnection(connection)) { con.Open(); OleDbCommand cmd = new...
Please Sign up or sign in to vote.
17 Apr 2012
enggmichael
Trythis oneadd name="Constr" connectionString="Data Source=path of server name(its may be your LAN Remote server );Initial Catalog=Database name; Persist Security Info=True;User ID=useid;Password=password;" providerName="System.Data.SqlClient
Please Sign up or sign in to vote.
18 Apr 2012
Vipin_Arora
For any ConnetionString, visit:http://www.connectionstrings.com/[^]click on Database Servers that you are using and get the connection string...
Please Sign up or sign in to vote.
22 Apr 2012
Sergey Alexandrovich Kryukov
I have a really fast dictionary application (with nearly O(1) complexity of the search which means it does not depends on the size of the dictionary), so I found that database cannot provide satisfactory speed, but a file with thoroughly designed indexing can.Please my past answers on the...
Please Sign up or sign in to vote.
7 May 2012
Jason Rudland
Trial of popular REST implimentations for NodeJS including the measuring of MongoDB insertion rates.
Please Sign up or sign in to vote.
7 May 2012
ekolis
Just a few recommendations:1. ID's should probably not be nvarchar(50); they would be better as int or guid. This way you can have them be autogenerated by the database.2. Spaces in column and table names are going to make writing queries messy, since you need to use the square brackets...
Please Sign up or sign in to vote.
17 May 2012
Monjurul Habib
Mika already provided you the solution. You can also try another solution if you are looking for concatenates two specified instances of String.Try String.Concat Method (String, String)For better detail please navigate the following link:How to: Concatenate Multiple Strings (C#...
Please Sign up or sign in to vote.
22 May 2012
Pete O'Hanlon
The problem generally isn't that SQL Server is a poor choice for bulk inserts, the problem actually lies in having to rebalance the indexes after each record is inserted. The more indexes you have, the more work the database engine has to do to cope with it. A common solution to this is to drop...
Please Sign up or sign in to vote.
23 May 2012
Issam Ali
from your code above I think you should remove ) before WHERE in the UPDATE command text. I hope this will help.
Please Sign up or sign in to vote.
23 May 2012
Wendelius
You seem to have an extra ) and you miss equal sign after penerbitAnd another observation: Don't concatenate values directly to your SQL statement since this leaves you open to SQL injections, data type conversion problems and so on. Instead use MySqlParameter[^].So your statement should...
Please Sign up or sign in to vote.
23 May 2012
Maciej Los
Take a look here: SqlDataReader Class[^] - on the bottom of page you'll find a solution: how to read data from datareader?
Please Sign up or sign in to vote.
31 May 2012
Manas Bhardwaj
I had these similar databases on my dev environment which I had to delete multiple times during development. As this process was becoming more and more mechnical, I wanted to have a script which would do this for me.
Please Sign up or sign in to vote.
4 Jun 2012
Dave Kreskowiak
Honestly, this would be dictated by your application requirements. Does the user request the token in the app? Is it supplied by an administrator? Is it forever linked to that user? Do they need to recover THAT token if the machine is wiped out and rebuilt? Can they request a new token if...
Please Sign up or sign in to vote.
11 Jun 2012
Manas Bhardwaj
As you haven't specified the type, this will be considered as Non Clustered.The default is NONCLUSTERED. Look at MSDN documentation [^]here.
Please Sign up or sign in to vote.
13 Jul 2012
Mehdi Gholam
The only limit to SQL Express is the size of database you can have (4gb for 2005-8, 10gb for 2010 last time I checked), the database files are interchangeable with backup and restore so you don't need to do anything.It is bad practice to install a database server for everyone with-in the...
Please Sign up or sign in to vote.
16 Jul 2012
Prasad_Kulkarni
You can use BETWEEN (Transact-SQL)[^]Create PROCEDURE ProcedureName @startDate datetime, @endDate datetime, ASBEGIN SELECT * FROM TableNameWHERE YourDate BETWEEN @startDate AND @endDate END
Please Sign up or sign in to vote.
21 Jul 2012
Christian Graus
None of this makes any sense. This is horrible code. 1 - you never factor things out to the point that you can run ANY SQL, you write strongly typed code that knows what it's doing2 - You NEVER pass raw text in to SQL, by doing this, you open yourself to SQL injection attacks. I can...
Please Sign up or sign in to vote.
25 Aug 2012
Wendelius
First of all, don't concatenate the values into your SQL statement directly. This will leave you open to SQL injections and may cause data type conversion problems and so on. Instead use the SqlParameter[^].About the actual question, you can use the SelectedValue[^] of the combobox to...
Please Sign up or sign in to vote.
25 Aug 2012
Cheetah.syr
just swap between textBox1.Text and comboBox1.Items[0].ToString()where items[0] mean the first value in ComboBox and you can replace it with the second value items[1] ...etc >> good luck
Please Sign up or sign in to vote.
2 Sep 2012
Espen Harlinn
Have a look at: ASP.NET Authentication[^], Forms Authentication Provider[^], Managing Users by Using Membership[^] and ASP.NET Login Controls[^]Pay attention to the The ChangePassword Control which allows users to change their password. The user must first supply the original password and...
Please Sign up or sign in to vote.
2 Sep 2012
Roliking
you can create a function like this and execute the function to get your desired outputcreate function fnCheckExists()returns bitasbegindeclare @val as bit=0;if exists (select yourColumn from yourTable)begin set @val=1;endelsebegin set @val=0;endreturn @valend
Please Sign up or sign in to vote.
6 Nov 2012
kankeyan
you need to reseed the identity column. check for the below example.Hope this may help you.If helps Vote it.USE AdventureWorksGO/* Create a table with one identity column */CREATE TABLE TableID (ID INT IDENTITY(1,1), Col VARCHAR(10))GO/* Insert 10 records with first value...
Please Sign up or sign in to vote.
6 Nov 2012
Eyakem
Here is a quick example, i'll walk you through..1 Lets create a table called UserTable2 insert four rows3 delete the first row (so we are where you are now, a table that starts from ID=2My solution: copy the contents of the table to a temporary table, truncate the origional table and...
Please Sign up or sign in to vote.
27 Nov 2012
Aadhar Joshi
Creating job in sql server which automates taking backup of all stored procedures and functions in physical drive.
Please Sign up or sign in to vote.
8 Dec 2012
D Waller
Try the following implementation (I have not tested this):public void TestGetDataReader() { string strDbConn = "Database connection string"; string strQry = "Database Query"; using (DbConnection dbConn = new SqlConnection(strDbConn)) ...
Please Sign up or sign in to vote.
21 Dec 2012
Hasham Ahmad
this might helpclick here[^]
Please Sign up or sign in to vote.
9 Jan 2013
Maciej Los
You need to use one of the ranking functions[^].For example, you can use ROW_NUMBER(). Try this:DECLARE @myTable TABLE (aValue INT)INSERT INTO @myTable (aValue)VALUES(123)INSERT INTO @myTable (aValue)VALUES(456)INSERT INTO @myTable (aValue)VALUES(789)INSERT INTO @myTable...
Please Sign up or sign in to vote.
15 Jan 2013
MT_
Following query may helpselect sum(price)from yourtablewheredatepart(mm,yourDateColumn)=yourMonthSelectedanddatepart(yy,yourDateColumn)=yourYearSelectedDon't have SQL access at present, so check syntax, though logically thsi si correctHope that helpsMilind
Please Sign up or sign in to vote.
17 Jan 2013
Zoltán Zörgő
Let us not abandon SQL Server for a second: there is a feature called FILESTREAM, that could be exactly what you need. And the SQL Server Express database size limitation does not apply to the FILESTREAM data!Read these:-...
Please Sign up or sign in to vote.
5 Feb 2013
Ankur\m/
The formula is simple. You add the two numbers and divide them by 2 and you have the mid value.But the problem here is the numbers here are in time format. Moreover there could be AM/PM issues.So this is what you do here: STEP 1: Convert Time1 to millisecondsSTEP 2: Convert Time2 to...
Please Sign up or sign in to vote.
15 May 2013
h_wiedey
Implementation of relative database constraints and permissioning using triggers and shadow tables.
Please Sign up or sign in to vote.
7 Feb 2013
Mike Meinz
You need to keep history. Perhaps indefinitely. You need a "logical" deletion flag usually a Bit data type column with a name like "ActiveProduct". An active product that customers can buy would have the ActiveProduct column = 1. When a product is to be deleted from the current product...
Please Sign up or sign in to vote.
10 Mar 2013
Leo Chapiro
Take a look at this answer, seems to be the same (at the first glance): operation must use an updateable query ms access[^]One quite likely reason is that the user running the program doesn't have read-write access to the database file, especially if it is located in program files folder....
Please Sign up or sign in to vote.
25 Mar 2013
Maciej Los
Please, check:1) what is returned by dialog.FileName. It should be the full filename of another database.2) does version of both databases are equal? If not, connection string might be differ.[EDIT]I have done it in this way and it works perfect:using System;using...
Please Sign up or sign in to vote.
8 Apr 2013
Sergey Alexandrovich Kryukov
I would suggest original MySQL documentation and tutorial: http://dev.mysql.com/usingmysql/java/[^].It's also good to learn JDBC even without connection to MySQL, so please...
Please Sign up or sign in to vote.
12 Apr 2013
Abhinav S
It will not be optimal for you to fetch records in groups of 30 from the database. To optimize this connection and network overhead, get all data using a single query. Put this data in a DataTable.Loop through groups of 30 in the DataTable, get the email ids and send mails before proceeding...
Please Sign up or sign in to vote.
11 Apr 2013
ZurdoDev
SELECT CreateDate FROM Users WHERE UserName = @UserNameThen just store the value into a control, wherever you want.
Please Sign up or sign in to vote.
15 Apr 2013
CPallini
If I got you, you need to create a table containing user descriptions (e.g. details, privileges).You may do that in both ways, use the method that best fits your needs. For instance, if you need a custom interface then make a web application in order to modify it, otherwise phpMyAdmin is a...
Please Sign up or sign in to vote.
25 Apr 2013
OriginalGriff
The only way to guarantee getting the last entered is to timestamp the records when you create them, but including a datetime column in the table. This allows you to use the ORDER BY clause in your select query, and then return the top 30 results:SELECT TOP 30 * FROM MyTable ORDER BY EnteredAt...
Please Sign up or sign in to vote.
29 Apr 2013
Aydin Homay
HiYou can convert your access database into SQL Server really easily, With Import option in SQL Server, you just need to create new database in your SQL Server and after that you can use Import Database option, these links can be use full...
Please Sign up or sign in to vote.
30 Apr 2013
Balimusi
WCF might be a good option for you. You can take advantage of the attributes that WS-Security provides – it describes how to handle security issues within the SOAP messages. WS-Security assigns the signature and encryption information as well as the security tokens to the SOAP messages. Besides...
Please Sign up or sign in to vote.
8 May 2013
Kschuler
My first thought is that you add a column. For each row you generate a random number and populate that column with it. Then sort by that column.Google Results for Generating a Random Number[^]
Please Sign up or sign in to vote.
8 May 2013
CHill60
Try reading the data with the following SQL SELECT TOP 100 percent * FROM [yourtable] ORDER BY newid()You can change the 100 percent - I just assumed you'd want the entire table.You could also drop the percent to get e.g. 100 questions.With acknowledgements to Ralph Shillington[^]
Please Sign up or sign in to vote.
27 Jun 2013
Pheonyx
I would suggest re-instantiating your redr object for each iteration of the outer loop as I do not believe there is a way to more an OLEDBReader back to the start.As an alternative you could populate a datatable with the information then just read through that.so outside your outer loop...
Please Sign up or sign in to vote.
10 Jul 2013
Sergey Alexandrovich Kryukov
As ryanb31 suggested, connection1.sqlcommand could be null, another possibility is connection1 to be null.Too bad you did not collect and share this information. Not to worry. This is one of the very easiest cases to detect and fix. It simply means that some member/variable of some reference...
Please Sign up or sign in to vote.
3 Aug 2013
André Kraak
You have duplicates because the orderPeriod field is in the SELECT statement.Remove this field from both the SELECT and GROUP BY and you should get a total for each product without duplicates.SELECT DISTINCT productName, SUM(quantity) AS Expr1 FROM WP_analytic WHERE (orderPeriod >=...
Please Sign up or sign in to vote.
16 Sep 2013
Maciej Los
Test it:DECLARE @lessons TABLE(LessonID INT IDENTITY(1,1), LessonName VARCHAR(30))INSERT INTO @lessons (LessonName)SELECT 'lesson A'UNION ALL SELECT 'lesson B'UNION ALL SELECT 'lesson C'UNION ALL SELECT 'lesson D'--UNION ALL SELECT 'lesson E'DECLARE @subject_lesson TABLE...
Please Sign up or sign in to vote.
30 Sep 2013
Amol_B
You can use order by clause to order data as per your needs.If you want record to be stored in specific order then it cant be done as record are inserted in database as first come first serve basis. And even if records are stored in any order in database you can always 'Order By. your queries...
Please Sign up or sign in to vote.
30 Sep 2013
Azee
Hello there,It seems, in this part of the statement,select distinct ((select MAX(Book_id) from Hadiths_Books) + ROW_NUMBER() OVER(ORDER BY hadith_eng_book)) you are trying to generate an ID that is one greater that the last ID in the table.So instead of doing that, why don't you set the...
Please Sign up or sign in to vote.
1 Oct 2013
OriginalGriff
You can't use an SQL database on a computer unless it has access (via the LAN perhaps) to an instance of SQL Server - because SQL server is there to insulate your program from the database file itself and allow it to be used in a multiuser environment. Any installation of SQL server will include...
Please Sign up or sign in to vote.
4 Oct 2013
W Balboos, GHB
You've got it organized incorrectly - this is a relational table problem.Table 1: Each student entered once with a unique identifier (like an identity field)Table 2: A reference to the student (col 1) and a preferred partner's identity (col 2). There can be multiple records in this table...
Please Sign up or sign in to vote.
7 Oct 2013
M Rayhan
You can easily find that database on you App_data folder in solution explorer. Double click on the database then it will be opened in Server explorer. You can then browse the database tables etc.If you can not see the ASPNETDB.mdf file the click on show all files on top of solution...
Please Sign up or sign in to vote.
11 Oct 2013
ASP.NET Community
Employee Info Starter Kit is an open source ASP.NET project template that is intended to address different types of real world challenges faced
Please Sign up or sign in to vote.
7 Nov 2013
E.F. Nijboer
In a scenario like this, let the database engine worry about concurrency. The sessions in the business logic are unrelated and don't need to know about each other. It would only slow you down. Simply make sure you have some temporary reservation for customers that are just about to pay (which...
Please Sign up or sign in to vote.
7 Nov 2013
E.F. Nijboer
The buzzword is ACID!Here some links to check out. This first is just a nice short story example:http://michaeljswart.com/2011/07/acid-properties-by-example-and-counterexample-part-one-atomic/[^]Check out this link for more in depth information. Also check out the left tree with lots...
Please Sign up or sign in to vote.
10 Dec 2013
Bruce Yang CL
A way to query the data from Internet
Please Sign up or sign in to vote.
12 Dec 2013
Peter Leow
Try this:SELECT * FROM InformationDataWHERE NOT EXISTS(SELECT * FROM Filters INNER JOIN LUserToFilter ON Filters.id=LUserToFilter.FilterId WHERE (InformationData.Title LIKE CONCAT('%',Filters.KeyWord,'%') OR InformationData.Description LIKE CONCAT('%',Filters.KeyWord,'%')) AND...
Please Sign up or sign in to vote.
23 Mar 2014
Mehdi Gholam
Generally avoid encoding data with commas into columns, create a details table instead this will make you life easier and queries much simpler.
Please Sign up or sign in to vote.
23 Mar 2014
Sergey Alexandrovich Kryukov
This is a problem of many-to-many relation. For example, you can create a separate table "user-branch associations" with two foreign keys, one referencing a user, another one — a branch. Same thing about account types: a table "user-account type associations".—SA
Please Sign up or sign in to vote.
2 May 2014
thatraja
Education Needed[^] & Useful Reference Books[^]
Please Sign up or sign in to vote.
19 May 2014
bling
0. initialize all global variables.char deleteid[12] = {0};char updateid[12] = {0};char data_tc_idno[12] = {0};char data_id[13] = {0};char data_adress[30] = {0};char data_name[30] = {0};char data_telno[12] = {0};int deleteStatus[30] = {0};struct student list2014[30] =...
Please Sign up or sign in to vote.
19 May 2014
OriginalGriff
Probably, the "not handling so much data well" problem is more a function of your code than or the database: a 9600 baud connection is pretty slow - it's less than 1KB/sec which is less than 1/1000th of an acceptable (but slow) ADSL connection. And there are plenty of systems out there taking...
Please Sign up or sign in to vote.
22 May 2014
Arjun Holla
http://www.bimonkey.com/about-the-bi-monkey/support/ssis-component-samples-list/[^]
Please Sign up or sign in to vote.
10 Jun 2014
Naz_Firdouse
your parameter names are mismatch...replace @8 and @9 in youe insert query with @d8 and @d9...change your code like this string cb = "insert into Registration(Username,Userpassword,Name,Surname,PhoneNumber,Email,DateOfBirth,UserType,Picture) VALUES...
Please Sign up or sign in to vote.
5 Aug 2014
Anis Derbel
The easy way to connect to Mysql using Wamp server on WPF
Please Sign up or sign in to vote.
13 Aug 2014
Jitendra Satpathy
1 alternative  
I'm new to windows form development. So i have developed a windows form application for my dad.It uses a small portion of data base i have used sql server 2008 for designing the data base. Now i want to deploy the app so that it may run on my dad's pc without any need of installation of...
Please Sign up or sign in to vote.
11 Sep 2014
_Asif_
You can't divide a column into sub columns. As Rohan has said in the comments this should be addressed at the UI layer.You should return result as Column1 | Column2 | Column3 | Sub Column 1 | Sub Column 2 | Sub Column 3and in the DataGrid you should apply a Template to show Sub Column...
Please Sign up or sign in to vote.
17 Oct 2014
W Balboos, GHB
An alternative to answer one (which is a good method) is a two-table answer relying upon tagging.Table 1 has your primary key data.Table 2 uses a ref to the primary key, a tag, and a value.The tag is equivalent to a column name. You add as many tagged values as you need for each...
Please Sign up or sign in to vote.
24 Oct 2014
essentialSQL
How to sort your query results in SQL Server
Please Sign up or sign in to vote.
28 Oct 2014
Er. Dinesh Sharma
HI Try thiscreate procedure demo1@input int as declare @transcounter intset @transcounter=@@TRANCOUNTIF @@TRANCOUNT>0save tran demoelsebegin trydelete emp where empid='1'commit tranEND TRYBEGIN CATCHEND CATCH;
Please Sign up or sign in to vote.
3 Nov 2014
King Fisher
how to use between operatorhttp://www.w3schools.com/sql/sql_between.asp[^]
Please Sign up or sign in to vote.
4 Nov 2014
binit.ku.singh
Connect MongoDB from any working directory on ubuntu
Please Sign up or sign in to vote.
21 Nov 2014
/\jmot
Links..http://techbrij.com/html5-geo-location-sql-server-asp-net[^]http://msdn.microsoft.com/en-us/library/bb895266(v=sql.105).aspx[^]
Please Sign up or sign in to vote.
5 Dec 2014
Md.Sajidur rahman
This structure describes how to process data from multiple branches and store to analysis.
Please Sign up or sign in to vote.
29 Dec 2014
Erick Wodarz
I would get rid of the GetQuantity function and use the following sql...SELECT [ProductCode], Count(Quantity) as QuantityCount FROM [Database] Group by ProductCode;You will be able to check both the productCode and the Quantity in a single function.I don't believe you need the...
Please Sign up or sign in to vote.
12 Jan 2015
Leom Burke
EF Code First and WPF with the Chinook Database - Styles and DataTemplates
Please Sign up or sign in to vote.
23 Mar 2015
OriginalGriff
Use the DateTimePicker control, and collect the user input from it's Value property - this hands you a DateTime value which is guaranteed to be valid.Then use a parameterised query to pass the DateTime value directly to SQL and store it in a DATE Column. using (SqlConnection con...
Please Sign up or sign in to vote.
5 May 2015
Mehdi Gholam
You can't restore a MSSQL .bak file to MySql.You have to migrate the data : http://mysqlworkbench.org/2012/07/migrating-from-ms-sql-server-to-mysql-using-workbench-migration-wizard/[^]https://www.mysql.com/why-mysql/white-papers/guide-to-migrating-from-sql-server-to-mysql/[^]
Please Sign up or sign in to vote.
10 May 2015
Osama Abu Sitta
1 alternative  
what is difference between ‘WITH NO CHECK’ and ‘NO CHECK’ in SQL Server ??
Please Sign up or sign in to vote.
11 May 2015
Member 11039257
Using WITH NO CHECK:We have a table with 100 records.1)Now we are creating a foreign Key Constraint by altering that tableALTER TABLE [Sales].[SalesOrderDetailTemp] WITH NOCHECK ADD CONSTRAINT [FK_SalesOrderDetailTemp_SalesOrderHeader_SalesOrderID] FOREIGN...
Please Sign up or sign in to vote.
27 Jun 2015
CPallini
ComboBox1 is (a reference to) a Control, while a string is expected there (e.g. ComboBox1.SelectedItem.ToString()).Of course, you should also follow the advice on using parameterized queries.
Please Sign up or sign in to vote.
27 Jun 2015
Sergey Alexandrovich Kryukov
Of course combo box cannot be converted to string, so it's strange that you even complain about the error. Probably you mean the text of the combo box selected item.But your approach is wrong from the very beginning. The query composed by concatenation with strings taken from UI. Not only...