Click here to Skip to main content
15,889,834 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 Aleksandr Ulanov
Learn how to use Redis and its geospatial indexes and commands for complex geo calculations
by Rob Culhane
How to 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.

Latest Articles

by Nicolas DESCARTES
What are vector databases?
by Ștefan-Mihai MOGA
How to solve real-life problems using B-trees
by Mark Pelf
Showing problems with limited accuracy of SqlServer data type “datetime” in .NET7 EF7 environment
by Mark Pelf
Tutorial on EF7 – Code First approach using Command Line (CLI)

All Articles

Sort by Updated

Database Development 

21 Mar 2010 by #realJSOP
You have to parse the string. There are a couple of ways to do it, and which way you do it is completely based on your own needs.0) You can use the string.Split method, splitting on the ';' character, and then parsing the resulting substrings1) You can use the string.IndexOf() method...
26 Apr 2010 by #realJSOP
I would go web service as long as you make it secure enough.
9 Jul 2010 by #realJSOP
I wrote a tip that applies to retrieving data from a web service, but you could easily convert the concept to your specific (and poorly stated) needs (including writing to the database).Pass Dynamic List of Parameters to Web Service[^]
19 Jul 2010 by #realJSOP
Your question makes little sense. If you are asking if you can get aweb serive's settings from a database in order to communicate with the web service, yes you can, but only if that database can be accessed without the use of the web service. Typically, a web service can only be accessed...
9 Sep 2010 by #realJSOP
Put the query into a stored proc, and pass the necessary parameters into that stored proc.
20 Sep 2010 by #realJSOP
You can't do it. Silverlight requires some form of web service to connect to a database. Period.
7 Nov 2010 by #realJSOP
If you need to pass a null value to a database, use DBNull.
20 Nov 2010 by #realJSOP
There's no way we can answer this for you, because only YOU know what your schema needs to look like.
22 Nov 2010 by #realJSOP
Create/encrypt the data in memory, and save it to the disk. When you need to load the data, load it into memory, decrypt it, and parse the XML as you normally would.
8 Dec 2010 by #realJSOP
You need to pass the XML data to the stored procedure, and in SQL Server, specify a XML parameter in the stored procedure prototype. Google is your friend.
20 Dec 2010 by #realJSOP
Two things you can consider:0) You could lock the record being modified when someone requests the data, and then when a 2nd user requests it while the record is locked, make the edit fields read-only. Put a refresh button on the form and allow the user to re-request the data until he can put...
3 Jan 2011 by #realJSOP
This question cannot possibly be answered here (in Questions & Answers) because the topic its too broad, and a variety of opinions can be expressed. Repost it in the appropriate forum so you can have a threaded discussion about it, or limber up your google muscle and research this thing yourself.
6 Jan 2011 by #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...
13 Jan 2011 by #realJSOP
The client app can get it via either a HttpWebrequest, or an XMLHttpRequest. The data would come back as xml, and could then be parsed by the client. On the other hand, you could write a webservice that could handle both the web app AND the client app.Google is your friend.
20 Jan 2011 by #realJSOP
Are you doing something like this:http://support.microsoft.com/kb/307283[^]
20 Jan 2011 by #realJSOP
0) If any of those text boxes are empty, your code will fail.1) You really should put a try/catch block around the whole thing.2) Is it failing, or are you just here asking if the code looks alright?
20 Jan 2011 by #realJSOP
Found with google:Differences between centralized and distributed Data Warehouses[^]An how to do it:http://technet.microsoft.com/en-us/library/cc917677.aspx[^]
7 Apr 2011 by #realJSOP
If it were me, I'd create a separate web service for the other database, sinc eit needs its own connection string.
4 May 2011 by #realJSOP
Would it be possible to simply transfer the table as a binary file using FTP or TCP/IP, and then let the remote machine do all the database work itself?If you want to ensure some kind of recovery system (in the event the transfer is interrupted), you could send smaller files and alt least...
6 May 2011 by #realJSOP
Try these:Provider=Microsoft.JET.OLEDB.4.0;Exchange 4.0;MAPILEVEL=Personal Folders\;PROFILE=Outlook;TABLETYPE=0;DATABASE=C:\temp;Persist SecurityProvider=Microsoft.JET.OLEDB.4.0;Exchange 4.0;MAPILEVEL=Outlook Address Book\;PROFILE=Outlook;TABLETYPE=1;DATABASE=C:\Documents and...
9 May 2011 by #realJSOP
Because it's required to make it work. That's the best I know to tell you.
12 May 2011 by #realJSOP
You probably want to use a blob field - some web pages can be huge.
19 May 2011 by #realJSOP
If it's saved as an image, you could do this to get it on the screen (using the appropriate ImageFormat enum of course):// Set the content type and return the imageResponse.ContentType = "image/GIF";bytes.Save(Response.OutputStream, ImageFormat.Gif);
12 Jun 2011 by #realJSOP
Are you double-damn sure that the file exists?
21 Jun 2011 by #realJSOP
Server side. Your aim should be to reduce the traffic between the client and the server.
28 Jul 2011 by #realJSOP
In the Page_Load event handler, if it's not a postback, update the database.EDIT =============Marked as the answer, yet given a 1-vote? Absurdity...
1 Aug 2011 by #realJSOP
Why aren't you putting the SqlConnection stuff inside the try block? I would step through it with the debugger to see what's happening.
10 Aug 2011 by #realJSOP
If you don't need to keep any kind of history, I'd use a Settings object, and just store them on the local machine.
30 Aug 2011 by #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.
1 Mar 2012 by #realJSOP
6.7 million google search results for the phrase "using entity framework" [^]
30 Sep 2016 by #realJSOP
0) Create a model for your items1) Load the results of the database query into a list of model items2) Create a new model item that contains the desired summed fields (use LINQ to get your sums).3) And the new model item to the list4) Bind the list to the dataGridView control.
13 Oct 2016 by #realJSOP
Where [order status] is not null
24 Oct 2016 by #realJSOP
I would use a combination of the SSB and a Windows service to poll. You might want to read this: Using tables as Queues[^]
4 Jan 2017 by #realJSOP
I provided a class in my solution to this answer: How do I run access from a WS 2012 and IIS 8 with ASP.NET[^]
31 Jan 2017 by #realJSOP
A scalar function to determine if a given DateTime is one of the ten US federal holidays, using SQL Server.
31 Jan 2017 by #realJSOP
Using common table expressions to build data from thin air.
8 Feb 2017 by #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...
22 Sep 2017 by #realJSOP
It doesn't always happen the way you expect.
22 Mar 2018 by #realJSOP
-- drop the temp tables if they already exist IF OBJECT_ID('tempdb..#InvHeader') IS NOT NULL DROP TABLE #InvHeader IF OBJECT_ID('tempdb..#InvItems') IS NOT NULL DROP TABLE #InvItems -- create the temp tables CREATE TABLE #InvHeader ( InvNumber INT, [Name] NVARCHAR(50) ) CREATE...
13 Apr 2018 by #realJSOP
The only way you can guarantee the order of data is to use the order by clause when you perform a query. How it is ordered in the table is inconsequential.
1 Mar 2019 by #realJSOP
Google is your friend: Work with JSON data in SQL Server - SQL Server | Microsoft Docs[^]
18 Mar 2019 by #realJSOP
If it were me, I'd find a library that already knows how to parse CSV files, anduse that. Simply splitting eachline on a comma will NOT always get the job done. Furthermore, putting the data into the database with an appropriate datatype is the only way to do it right. I wrote a library that...
29 May 2020 by #realJSOP
Dude, learn how to format your code so we can read it. Beyond that, here is your code formatted. Note the comments: SELECT Q.DTNUMEXE ,Q.DTMOIEXE ,Q.DTANNQIT ,Q.DTMOIQIT ,Q.DTCODBRC ,Q.DTSERQIT ...
15 Jan 2014 by (pmac)
Can anyone explain me what bin_and() means in firebird db?How to convert the statement below to sql server 2008?If (bin_and(VarA, VarB) = VarA)ThenBegin--my codeEndThanks in advance,
11 Sep 2014 by /\jmot
DataTable dt1 = new DataTable();dt1.Columns.Add("SiteName", typeof(string));dt1.Columns.Add("State", typeof(string));dt1.Columns.Add("Cluster", typeof(string));for (int i = 0; i
21 Nov 2014 by /\jmot
Links..http://techbrij.com/html5-geo-location-sql-server-asp-net[^]http://msdn.microsoft.com/en-us/library/bb895266(v=sql.105).aspx[^]
18 Feb 2015 by /\jmot
Try.crtetae 2 table for the order.1st one for the overall order_details and 2nd one for the the item_details for the order.like this.Tabl_Item...
18 Mar 2015 by /\jmot
try:update user set max_questions = 10000 where user = 'root'if you put 0, it means unlimited.
7 Jan 2014 by 121ss
how can i set auto increment property in oracle 11g database for primary key columni have used a code like thatcreate table test_tab( id number primary key);create sequence test_seq start with 1 increment by 1 nocycle;create or replace trigger test_trg before insert on...
8 Mar 2022 by 123 123 2022
How to empty specific column of numbers from datagridview? (i mean erase the values without header, not delete the column). ERASE datagridview calumn values, so i dont need to do it manually and continue writing new ones. How i created the...
17 Jul 2013 by 12345_abcde
i have a database table containing: SEG,AMK,101427Y,EG3902,EG3902-G1 SEG,AMK,101427Y,EGS650,EGS650-G1 SEG,AMK,103852S,EG3901,EG3901-G1 SEG,AMK,103852S,EG3904,EG3904-G1 SEG,AMK,103852S,EGS104,EGS104-G1 SEG,AMK,103852S,EGS650,EGS650-G1 ...
8 Jul 2013 by 1Future
Hi guysi am sort of new to C# but i keep getting this one error which is now getting my nerves.I have created a database and when i try access my database :-private void button3_Click(object sender, EventArgs e) { TillDatabaseEntities tde = new...
26 Jun 2011 by 2irfanshaikh
Solution:s...
26 Jun 2012 by 2irfanshaikh
i think this link will help you http://blog.sqlauthority.com/2009/08/06/sql-server-get-time-in-hourminute-format-from-a-datetime-get-date-part-only-from-datetime/[^]andhttp://www.sqlusa.com/bestpractices2005/centurydateformat/[^]use case, datepart, group by statement to calculate no....
2 Jul 2012 by 2irfanshaikh
i think this will help youSelect Cast(height as varchar(20)) + ' X ' + Cast(width as varchar(20)) + ' ' + unit from [Tablename]also before asking the question. please search it first then ask the question.
17 Mar 2013 by 7774tlas
This is a snippet from a similar app. You should be able to adapt it for your needs.Private Function Total() As Double Dim total As Double = 0 Dim i As Integer = 0 For i = 0 To DGV_PYX.Rows.Count - 1 tot = tot +...
7 Mar 2015 by @sunusi1
hi guys i am having problem in selecting the maximum of number of a column called booking id, in a 'booking' tablei wrote my sytax like this
8 Sep 2012 by __TR__
You question is not clear. I am assuming you have more than one Academic Record that you want to insert into to your database through a stored procedure.The only reason I can think of you wanting to insert the records by passing it as values into the stored procedure is because the stored...
13 Sep 2012 by __TR__
Refer this similar threadAuto complete Textbox in asp.net using ajax and c#[^]
23 Nov 2012 by __TR__
Use this link[^]
13 Dec 2012 by __TR__
Take a look at these CP articlesUsing ADO.NET for beginners[^]Database Manipulation with ADO.NET for beginners[^]
7 Jan 2013 by __TR__
TrySELECT a.Salary FROM MyTable aWHERE 3 = (SELECT COUNT(DISTINCT (b.Salary)) FROM MyTable b WHERE a.Salary
18 Aug 2012 by _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 ...
17 Sep 2012 by _Amy
Probably you should use a handler to show the image from database. The procedure of mapping the images from handler in repeater is same as gridview.Refer the links below:Using the ASP.NET Repeater Control [^]Inserting images into database and display it in gridview through...
4 Mar 2013 by _Amy
Try this query in your datatable:var uniqueColors = (from dbo in MainTable.AsEnumerable() select dbo.Field("Column").Distinct();--Amit
26 Apr 2013 by _Amy
You could have tried Google[^] for the solution.Refer the links below:Show Image in Listview retrieve from database in ASP.net[^]How To Retrieve Image from Database in ListView Control in asp.net 3.5 [^]How to Retrieve Images from Database into Listview using Eval()[^]--Amit
16 Jun 2013 by _Amy
Try this:CREATE PROC ListStudents @Name varchar(20)=''ASBEGIN SELECT * FROM StudentDet WHERE Name LIKE ''+@Name+'%'ENDWhen you need the details of particular student you can pass the name. If you'll not pass name then it'll list the details of all students.EXEC ListStudents...
6 Jul 2013 by _Asif_
The problem is you are passing only one parameter named Status to insert sql, statuslevel is missing from your select statement. Modify your sql in below format. This could solve your problem.INSERT INTO tblsummaryIMPORT(status,statuslevel)SELECT CASE WHEN @statuslevel=50 THEN...
26 Aug 2013 by _Asif_
Check this linkPass the values to the sybase stored procedure using DBI-Sybase module and exexute the procedure[^]
1 Mar 2014 by _Asif_
Try thisSetting Up an ODBC Data Source For MS Access[^]
11 May 2014 by _Asif_
Check this link. Hope it helps your issueError message when you run a query in Access: "The field is too small to accept the amount of data you attempted to add"[^]
11 Sep 2014 by _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...
18 Jan 2015 by _Asif_
You require scheduling mechanism which schedule the activity and at define time trigger the event.Below link might help!A Simple Scheduler in C#[^]
21 Jan 2015 by _Asif_
I believe this is what you want! Check below link5.5 Database Export and Import[^]
1 Feb 2015 by _Asif_
This seems okay, but i like to point you in a different direction. How about making a single table named Region which will hold the whole hierarchy that is (district, tehsil, UC, Village). For example Region(Region_ID, Parent_Region_ID, RegionName, IsTehsil, IsUC, IsVillage, IsDistrict,...
23 Nov 2015 by _Asif_
Try this script which modifies a PK column to auto increment.DROP TABLE TESTGOcreate table test( code varchar(100), DESCR varchar(1000) CONSTRAINT P_test_code PRIMARY KEY CLUSTERED(code))goinsert into test(code, DESCR)select 'A', 'AAAA'UNION ALLselect 'B',...
31 Dec 2015 by _Asif_
check this cool article SQL Server SUSPECT database[^] which forces a DB into SUSPECT Mode
12 Jan 2016 by _Asif_
The problem is heredate = DateTime.Now.ToString();for debugging purpose change this line to thisdate = '01-Jan-2016';and re-execute the code, you will see that it gets successfully executed and a row has been added in the message table.Now its your task to understand what is the...
14 Jan 2016 by _Asif_
A bit performance optimized version of the SQL would be likeSELECT *FROM DIRECTORS DLEFT OUTER JOIN MOVIES M ON D.DIRECTOR_ID = M.DIRECTOR_IDWHERE M.DIRECTOR_ID IS NULLSub Queries have performance cost because they evaluate over each row.
14 Jan 2022 by _Asif_
Hopefully below link should help How to change the Subject Text returned by Jobs/MP/DBMail? – SQLServerCentral Forums[^]
22 Nov 2023 by _Asif_
This is a bit interesting problem. I have created a sample solution for you that you can extend as per your need. The actual issue is 15000 courses that you can't export as columns. Practically speaking in a given date range (semester) we are...
22 Mar 2010 by _Damian S_
Add an Identity column to your database with the type "Autonumber".
7 Jul 2011 by _Maxxx_
You can use the sql function DatePart(week,@date) to return the week number
10 Nov 2014 by _Maxxx_
It is a vast and complex field. Governments have ploughed millions into the development of software that tries to do this - and mostly failed!The medical industry have a number of classification/encoding systems many of which aren't cross-compatible.As this is an amateur project, I'd...
22 Nov 2012 by _Natula
http://www.bidn.com/blogs/indupriya/bidn-blog/553/determine-users-connected-to-sqlserver-database[^]http://www.cryer.co.uk/brian/sqlserver/howtolistallconnectedusers.htm[^]
9 Jun 2014 by _nurhan
Hello and good day everyone,i got a problem in my database. i'm trying to create 2 table and one of these table have foreign key to other table. my problem is, the data that i make it as foreign key does not working, and the column text field remain null. i have try alter the table, drop the...
28 Mar 2011 by _Tushar Patil
Refer the mysql Guide or book where you will get command to see databases in the mysql server once you see all databases connect to database which u want else create new and do operations on it.....................
31 Oct 2012 by _Vitor Garcia_
Maybe your problem is with bkDevItem which is a local path of the client machine.When you backup a sql database, the device path should be one from the server machine.For test purposes, change s = SaveFileDialog1.Filename to s = "c:\someofolderYouCreatedAtServer\yourbackupfile.bak"
6 Sep 2011 by _Zorro_
Hi,You should check out some articles on Google about this, but here's a quick example:SqlConnection connection = new SqlConnection(connectionString);SqlCommand cmd = new SqlCommand("SELECT Table1.Field1 FROM [dbo].[Table1] WHERE Table1.Field2 = @Field2", connection); //@Field2 is a...
22 Apr 2011 by A.Rahimpour
Hi Everybody,I have a website which take advantage of MySQL database and PhpMyAdmin. I've created a database (My_db) and assigned a username and password to it as an admin (db_admin). This username is differed from my control panel username (CPanel_user). I also created a table and inserted...
6 May 2011 by a0a0a87
Hello,I currently have a ReportDataSource which i get the information i need from my stored procedure to display it in a reporting form. The return format is a table that will be filled in with content. Since this is based on Schools and Classes which means for each school a table will be...
1 Nov 2012 by a1mimo
Actually Godaddy have this but you need to get windows platform not linux for in linux you can't have sql database and you must use Mysql instead and you will find help in how to do that in there website in the faqs and help sectionUPDATE: Godaddy support[^]And you will need ftp client...
18 Oct 2012 by Aadhar Joshi
U can use Save Point functionality given for try can catch..SET NOCOUNT ON BEGIN TRANPRINT 'First Transaction: ' + CONVERT(VARCHAR,@@TRANCOUNT) INSERT INTO People VALUES ('Tom') SAVE TRAN Savepoint1PRINT 'Second Transaction: ' + CONVERT(VARCHAR,@@TRANCOUNT) INSERT INTO...
27 Nov 2012 by Aadhar Joshi
Creating job in sql server which automates taking backup of all stored procedures and functions in physical drive.
8 Feb 2023 by Aalam Pratap Bedi
ERROR in app: Exception on / [GET] Traceback (most recent call last): File "/home/aalam/Flask_Blog/venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1900, in _execute_context self.dialect.do_execute( File...
3 Feb 2015 by AaravG
Hello Nakul,I have an idea that may helps you. In my opinion the „delivered” status does not appear in your database, because the match of returning delivery reports is probably switched out for the originally sent SMS.You can setup the match this way:1. Launch your SMS gateway2....
16 Nov 2014 by aarif moh shaikh
Try This............. Defiantly you will get your Solution.. Update student set student.HobbiesId=Hobbies.HobbiesId From student inner join Hobbies on student.HobbiesId=Hobbies.HobbiesIdNote: If this Solve your Problem Please click on Accept Answer.ThanksAARIF SHAIKH
11 Aug 2012 by Aarti Meswania
you mean to save last line no. some where and when application start retrieve that line no.,read text file's lines on by one and nothing to do till counter reaches the line no. means if counter>= line_no then add entries in databaseyou can store Line-no three ways.1. In database2. In...
24 Feb 2013 by Aarti Meswania
when converting date format must be YYYY-MM-ddselect * from GpsData where DATE>convert(date,'2013/02/23')Happy Coding!:)