Click here to Skip to main content
15,914,400 members
Everything / SQLEXPRESS

SQLEXPRESS

SQLEXPRESS

Great Reads

by E. Scott McFadden
This article explains how to create and use a self referencing key in a SQL Server Table.
by ambilykk
How to enable SQL Express user

Latest Articles

by E. Scott McFadden
This article explains how to create and use a self referencing key in a SQL Server Table.
by ambilykk
How to enable SQL Express user

All Articles

Sort by Score

SQLEXPRESS 

8 Jan 2020 by E. Scott McFadden
This article explains how to create and use a self referencing key in a SQL Server Table.
8 Jun 2023 by Richard Deeming
Firstly, those Convert statements make me suspect you're storing your times as varchar, which is absolutely the wrong thing to do. Aside from the fact that there is no validation to ensure the column value is a valid time, it will also take up a...
10 Nov 2023 by Richard Deeming
You haven't specified which version of SQL Server you're using. Assuming 2017 or later, the simplest solution is to use STRING_AGG[^]: SELECT acctnum, STRING_AGG(note, ' ') WITHIN GROUP (ORDER BY srno) As note FROM YourTable GROUP BY...
7 Jan 2022 by OriginalGriff
If what you are looking for is to get the result as a single query result, then try this: SELECT (SELECT COUNT(*) FROM Customer) AS CustCnt, (SELECT COUNT(*) FROM Transactions) AS TransCnt, (SELECT COUNT(*) FROM prod_cat_info)...
24 Jan 2017 by Er Parul
add below code at the last after all parameters have added.cmd.ExecuteNonQuery();I did not see below ExecuteNonQuery code in your code.command.ExecuteNonQuery();
4 Sep 2018 by OriginalGriff
If you weren't going to listen when I told you yesterday: C# VS, sqlexpress - how do I use the datatable value and make a simple times calculation with textbox and appear the result in second textbox C#?[^] then why are you askign the same question again today? I assumed after the extensive...
10 Nov 2021 by CHill60
Please do some research and come back with a specific question (i.e. please read the posting guidelines) Some starters ... Securing SQL Server - SQL Server | Microsoft Docs[^] Everything You Need to Know about SQL Server Security | IEEE Computer...
17 Feb 2022 by PIEBALDconsult
p[12] = new SqlParameter("@Patient_img", SqlDbType.Image); p[12].Value = Patient_Email;
9 May 2023 by CHill60
The error is quite clear. You cannot restore a database that was backed up with a newer version of SQL Server onto a server running an older version. You will either need to upgrade your instance of SQL Server or find another instance that has...
26 Jun 2023 by Richard MacCutchan
You are suppressing all error messages. You need to replace /qs with /INDICATEPROGRESS in the command line, so you can see what is happening.
7 Jul 2023 by OriginalGriff
SqlCommand cmd = new SqlCommand($"InsertintoSalesInvoice {InvoiceNum},{ItemId},{qty},{SalePrice},{discount},{AmountAfterDiscount},{Paid},{Remain},{Total},{PaidDate},{CustomerId} ", cn); That's not a valid SQL command, or even close. INSERT INTO...
23 Aug 2023 by Dave Kreskowiak
This is not about your problem, or maybe it is, but you're using string concatenation to build the SQL query. This is a MASSIVE security problem and risks the destruction of your database. It amy also be causing your problems, whatever they are. ...
23 Aug 2023 by OriginalGriff
I concur with Dave - you should never 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. Always use Parameterized queries instead. When you...
23 Aug 2023 by Andre Oosthuizen
In addition to using parameterized queries as stated above, you have a value for your 'Tag_Type' field missing, jumping from 'WRAtts.QTY' to 'WRAtts.Dwg_Number'. To use parameterized query - Dim strconx As String = "Data...
8 Nov 2023 by Maciej Los
As is stated here[^] and here[^] you cannot connect Xamarin form(s) to sql database directly.
10 Nov 2023 by Maciej Los
There's few ways to achieve that. I'd like to provide a sample with Common Table Expressions: ;WITH CTE AS ( SELECT 1 Lvl, acctnum, note, srno, note newnote FROM Table1 WHERE acctnum IS NOT NULL UNION ALL SELECT C.Lvl +1, C.acctnum,...
8 Jan 2024 by OriginalGriff
Don't do that. Don't store CSV data in a single column, it's wasteful, inefficient, and leaves you with nasty problems whenever you want to use the data or change it. SQL string handling is ... um ... poor, so you have to jump through a lot of...
23 Jan 2017 by Rene Bustos
Hi guys.I have this case.Right now, im try to install an app. AND use SQL Database Desktop Engine 2000but , so far when i try to install my App in OS windows 8 or higher, then in the installation throw me an error of Compatibility, is for that, 'cause i need upgrade my Data base engine,...
20 Jan 2017 by Dave Kreskowiak
OK, I figured this out in about 15 seconds just by trying the Custom and Download Media options.Yes, you can download just the core engine installation (411MB) and install that. Just click the Download Media button and click the "Express Core (411MB)" option. Give it folder to download to...
24 Jan 2017 by Member 11790928
I have simple form which reads users name,email and city. I have created a database and a table with fields id,name,email and city. When i run the code i don't encounter any error or exceptions. But unable to see the inserted data into table.following is my codeSqlConnection con = new...
25 May 2017 by RickZeeland
According to info from Requirements and compatibility | Team Foundation Server Setup, Upgrade and Administration[^] SQL Server 2014 or 2012 are supported. If you're using SQL Server 2016, we require a Visual C++ runtime update to be installed.
4 Sep 2018 by Muhammad nur Ihsan
im new to this i wanted to create only a plus calculation with button&txtbox and display it in other textbox using the data int in my sqlexprs db. i've created a db and dtable in sqlserver management tool there is only product name and price. how do i do this.. pls give an example What I...
4 Sep 2018 by Muhammad nur Ihsan
Hell yes i got my solution!! Form1 load public Meja1() { InitializeComponent(); } SqlConnection con = new SqlConnection(@"Data Source = PC\SQLEXPRESS; Initial Catalog = MyLoginApp; Integrated Security = True"); private void Form1_Load(object...
24 May 2019 by TheOneTrueMongoloid
Does anyone have a good tutorial to learn how to add a record into an SQL database? The database is laid out with one primary key table and 9 foreign key tables that are related to it, or I suppose that it relates to. I know how to insert data from a form into one table that has no keys...
24 May 2019 by Gerry Schmitz
The updating of the indexes is "transparent". So, your question boils down to "how to insert a record". If your question is: how do I create a database with primary and secondary indexes, then that's another question / story. If in the process of inserting a record you violate secondary index...
1 May 2021 by Asfand May2021
My database was running fine ,I made no changes to it and all of a sudden it started giving me errors in insert query such as Msg 102, Level 15, State 1, Line 11 Incorrect syntax near '
1 May 2021 by OriginalGriff
Simple: get rid of the '' characters and the datatypes: INSERT INTO [dbo].[userRegistration] ([userName] ,[userEmail] ,[userPassword] ,[userDesignation] ,[userPhone]) VALUES ...
21 Jun 2021 by FranzBe
The Conversion failure comes from the one record in table getalldata that has a value of string 'active' in column '[Active]' If you expand your generated sql an perform it step by step SELECT TOP 1 'PL' AS 'PL' ,'Company' AS 'Company'...
22 Jul 2021 by Faraz Taha
Hi All, I want to do store procedure encryption with password, basically want to hide the logic behind the procedures... With Encryption (can easily decrypted by db forge decryptor I tried my self). Procedure Locking will not work as well if it...
22 Jul 2021 by OriginalGriff
WITH ENCRYPTION is the only security you can implement: any other system would make the SP unreadable by SQL Server and render the SP useless and unexecutable! If you want secured processing, you will have to move it to the presentation software.
26 Aug 2021 by prasanna204
hi Friends, I am inserting records into a datatable after insertion , max(sno) lessathan rows I am deleting. No When record is not inserting means SNO is not changing I need to delete that record immediatly.I have row created time field in the...
22 Nov 2021 by CHill60
Look at your line of code SET @SQLSTRING = 'DECLARE @RETURN_TABLE TABLE ('+@STATIC_COLUMN+' NVARCHAR(255) NULL,'+@TEMPVARCOLUMNS+') when you pass @STATIC_COLUMN as '[CompanyID]' @SQLSTRING will read DECLARE @RETURN_TABLE ([CompanyID]...
20 Dec 2021 by Tinsae Teku
update-database after adding migration on package manager console of Visual studio 2022 brings the following error: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or...
20 Dec 2021 by CHill60
OP has confirmed that they have never been able to connect to this database, so the addition of the package manager is not related. The connection string being used to attempt to connect to the database is incorrect. See SQL Server connection...
16 Mar 2022 by OriginalGriff
We can't help - we have no idea what part of that is working on what value. All we - and presumably you - know is that something is trying to parse a string to a DateTime value, and it's probably the dateTimeNOW.Text property assignment. And we...
16 Mar 2022 by Maciej Los
If f_Patient.dateTimeNOW is a DateTimePicker Control[^], you need to pass proper date/time value instead of string! So, this is wrong: f_Patient.dateTimeNOW.Text = this.DGV.CurrentRow.Cells[7].Value.ToString(); try: f_Patient.dateTimeNOW.Value...
18 Aug 2022 by OriginalGriff
While we are more than willing to help those that are stuck, that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for...
19 Aug 2022 by CHill60
In addition to Solution 1 ... You have not described your logic and it is not clear what your logic is to get to those figures. You seem to - switch between a 30 day month and a calendar month (I am assuming that EMI is the amount to...
11 Nov 2022 by Robert Underwood 2022
Hello, I have a query where I am trying to select tags that are uploaded every second, on a 1 minute and 30 second interval. I have declared a start of current month and previous month as this will run once a month. declare...
11 Nov 2022 by Robert Underwood 2022
DECLARE @CurrentDate as date SET @CurrentDate = GETDATE() DECLARE @monthAgo as date SET @monthAgo = DATEADD(month, -1, @CurrentDate) SELECT TOP (10000) FloatTable.[DateAndTime] ,FloatTable.[Val] ,TagTable.[TagName] FROM...
20 Feb 2023 by OriginalGriff
The error message is pretty clear: The ConnectionString property has not been initialized. (System.Data) It means what it says: you haven't provided the Connection string which tells the system which instance of SQL Server you want to connect to....
17 Mar 2023 by OriginalGriff
Your view query uses two INNER JOINs - which only return rows with matching data in both tables. So the most likely thing is that the JOINs are causing the reduced data because some of the ON conditions aren't matching in both tables. for some...
17 Mar 2023 by A Belal
i create table orderSales, typeCustomer, Customer i create view SELECT [id] ,[OrderDate] ,[Total] ,[Pay] ,[Remain] ,[Sales] ,[ValueAdd] ,[CustomerType] ,[Name] FROM [dbo].[vOrdersAll] GO but...
13 Jun 2023 by Member 12694392
I need to get data from table in SQL DB for particular time duration. table as below ID Start Time End Time 1 07:00 15:00 2 15:00 23:00 3 23:00 07:00 I need to design...
26 Jun 2023 by Member 11400059
Hi. I Want Silent installation of SQL Express 2019 with the Advanced Installer program. I using Below Parameter for this, But only the extraction part is worked and SQL Express not installed. it seems is getting error, But no error show. also I...
9 Nov 2023 by Andre Oosthuizen
Firstly make sure you have the necessary permissions and that your SQL Server is configured to allow connections from your Xamarin Forms app. Then make sure you have the correct dependencies and configurations in your Xamarin Forms project....
26 Jun 2023 by OriginalGriff
The real question is "why are you installing SQL Server at all?" You probably should not include SQL Server in your installation. There are a couple of reasons: 0) You can only distribute SQL Server Express for copyright reasons - not SQL Server...
2 Sep 2018 by OriginalGriff
Um. I see nothing that involves your DataTable outside the method in which you load it (and you'd be better off doing that with a DataAdapter rather than a DataReader - it involves a lot fewer round trips to the DB), so quite what you want to do is not obvious. But ... two things do spring to...
19 Mar 2018 by #realJSOP
select name from [mytablenmame] where CanAccess=1 [EDIT] Given the OP's sample data, where there are only TWO records for a given name, and EACH of them having a different value for CanAccess, aggregation is not required to get the results he claims to be after. Stop 1-voting my answer. [/EDIT]
22 Aug 2017 by ambilykk
How to enable SQL Express user
21 Jun 2021 by ahmed_sa
I work on sql server 2012 I face issue when make pivot for data I get error Conversion failed when converting the varchar value 'Active' to data type int. so how to solve this issue please table script as below CREATE TABLE [dbo].[getpldata](...
27 Jun 2022 by Pinakini Kolli
{ "Logging": { "LogLevel": { "Default": "Information", "Microsoft.AspNetCore": "Warning" } }, "AllowedHosts": "*", "ConnectionStrings": { "myDb1":"Data Source= PINAKINI\\SQLEXPRESS;Initial Catalog=...
29 Aug 2023 by Ender157
I am attempting to write data into a SQL table. Here is the code. Dim strconx As String = ("Data Source=.\SQLEXPRESS;Initial Catalog=Connex_Test;Integrated Security = true") Dim connectionx As New SqlConnection(strconx) ...
23 Jan 2017 by Rene Bustos
Well, the Solution that i did, was to Remove the Folder in Start up programs hahhai know, this is not the best solution but, works for me, because i don't want that the client play with SQL tools Thanks for your time guysBest regards.
24 Jan 2017 by Member 12962872
if the number of columns in the table tbl_insert is more than 3 then u should specify the specific column name also in the insert query...
24 Jan 2017 by Member 12962872
if the number of columns in the table tbl_insert is more than 3 then u should specify the specific column name also in the insert query...
25 May 2017 by Mufid Bagdadi
Dear Friend, I am not able to add database table in Visual studio 2015 through server explorer. When i try to add the table it shows a GIF image stating "Loading... The design surface is loading." I am using SSMS2017, SQL SERVER 2016 and Visual Studio 2015. Kindly help me for same. Kind...
4 Sep 2018 by Muhammad nur Ihsan
sorry im bad at coding but i need this, well.. in my table called Products got 2 column there is Product and Price in Price column contains a decimal value 1000 can i get that value(1000) to be a variable so i can use it into arithmetic function? and it seems to connect the database to my...
7 Jan 2022 by Shivam Kaushik
SELECT COUNT(*) FROM Customer UNION SELECT COUNT(*) FROM Transactions UNION SELECT COUNT(*) FROM prod_cat_info What I have tried: SELECT COUNT(*) FROM Customer UNION SELECT COUNT(*) FROM Transactions UNION SELECT COUNT(*) FROM prod_cat_info
16 Mar 2022 by ahmedbelal
i need to Edit row in database from DataGrid View the Problem is i need solution for System.FormatException: 'The string was not recognized as a valid DateTime. There is an unknown word starting at index 0.' i click f10 and compiler work my...
13 Jun 2023 by Member 12694392
not helpful. not getting data on same
7 Jul 2023 by A Belal
I want to create invoice Error Is An unhandled exception occurred while processing the request. SqlException: Incorrect syntax near '/'. Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, bool breakConnection, Action...
10 Nov 2023 by Member 11776570
Below is the table t1 in SQL with column like this, srno is the sequence just use to move cursor. acctnum(c1) note (c2) srno 12 abc 1 efd 2 xyz 3 15 pqr ...
8 Jan 2024 by Member 11776570
Below is the column data that has data in it. {"",11750,"","","","","","","","","","","","","","","","","","","","","","",""} ...
18 Mar 2018 by Krunal Rohit
Hello, I have following sort of records returned from a query. Name ===== CanAccess -------------------------------- Payroll ===== 0 Payroll ===== 1 Employees ===== 0 Employees ===== 1 Inventory ===== 0 Finance ===== 0 I want to select unique records from same Name if "CanAccess" is true for...
22 Nov 2021 by ahmed_sa
I work on SQL server 2012 i face issue when using multi column ON COLUMN as companyid,Year exec [dbo].[USP_DYNAMIC_PIVOT] '[CompanyID],[Year]','MetarialID','Metarialperc','#KTempSemlterfinialRows','max' it give me error as Msg 173, Level...
17 Feb 2022 by ahmedbelal
I design desktop Application for Clinic when i add new Patient when i run code my Error IS Error InvalidCastException: Invalid cast from 'System.String' to 'System.Byte[]'. What I have tried: my Code function Add : public static class...
19 Aug 2022 by Hemil Gandhi
I have number of loan related data in sql database and I want to process each records based on some logic. Logic and sample is as follows. I want to split EMI amount in multiple days/months slab I have One record like. Ac Balance EMI ...
20 Feb 2023 by ginini nkanu
i have been trying to import a dataset to y microsoft SQL server it keeps giving me this error messege "SQL Server Import and Export Wizard The operation could not be completed. ADDITIONAL INFORMATION: The ConnectionString property has not been...
9 May 2023 by A Belal
I Can't Restore Backup from SQL Server Database I use SqlServer 2019 Error is TITLE: Microsoft SQL Server Management Studio ------------------------------ Restore of database 'LapShop' failed....
13 Sep 2023 by basitsar
I have the below table structure. Having All Designations. CREATE TABLE [dbo].[Designation]( [DesignationNo] [int] IDENTITY(1,1) NOT NULL, [DesignationName] [nvarchar](50) NULL, CONSTRAINT [PK_Designation] PRIMARY KEY CLUSTERED (...
9 Nov 2023 by Stylus STYLUS
I have problem with connection to database XAMARINE forms Normal C# windows form app work with this string SSMS work normal with this credential string connectionString = "Data Source=sql.bss-solution.info,1433;Initial Catalog='ABC 2023';User...