Click here to Skip to main content
15,903,012 members
Everything / SqlDataSource

SqlDataSource

SqlDataSource

Great Reads

by J.Jash
Data Auditing Trigger Generator
by jurhas
Spada via Modbs, Supervisory Control and Data Acquisition with visualb basic,Arduino and firebird
by SRS(The Coder)
How to use Stored Procedures in Entity Framework Model First Approach
by Jason Parms
Lightweight Directory Access Protocol (LDAP) Injection

Latest Articles

by ambilykk
How to enable SQL Express user
by John C Rayan
MyBatis.NET as DataMapper
by Member 12149082
Description of useful SVG Filters and Interactivity
by Rajesh Manjarekar
When CDC is turned ON against a table and the underlying table schema changes, such as adding/removing a column, changing datatype etc

All Articles

Sort by Updated

SqlDataSource 

21 Oct 2016 by #realJSOP
0) What kind of idiot designs a SQL database to store a datetime as a nvarchar?1) Which "1" is the one you want to strip? At the beginning, or at the end? Do you even know what the actual purpose of the extra "1" is (why it's there)?2) The way your nvarchar string is shown, there's no...
9 Jan 2017 by #realJSOP
The server has to be configured to allow it. You have to contact the DBA that owns the server, and after it's properly configured, he can provide the appropriate connection string. However, any DBA worth his salt won't do as you ask, because it's more secure and auditable to have an outward...
28 Jun 2018 by #realJSOP
Try it something this: SELECT B.movie_title AS [Movie Title], A.branchID AS [Branch ID], C.dvdID AS [Total_Number_of_DVD] FROM RENT AS A INNER JOIN MOVIE AS B ON B.movieID = A.movieID INNER JOIN DVD AS C ON C.dvdID = A.dvdID WHERE A.dvdID IN (SELECT A.dvdID from...
29 Aug 2019 by #realJSOP
Google is your friend. Goole search for "SQL Server what is a foreign key"[^]
21 May 2013 by $ultaNn
how to concatenate in stored procedureI want to save P101 as id in One table and auto increment only number like P101,P102,P103 with every insertion of data this p101 should auto incrementthis is my procedure i want to save P101, P102 in Monitor_ID and Qty_Device_ID columns...
23 Jul 2013 by $ultaNn
i have two table Tbl_Device and Tbl_ReceivedQtyI want the sum of record with inner join Device i tried to join with this query but failed SELECT Tbl_Device.Device_Name, Tbl_ReceivedQty.Qty_Device_ID, Tbl_ReceivedQty.Qty_User, Tbl_ReceivedQty.Qty_Date FROM Tbl_Device...
27 Mar 2020 by $ultaNn
I was trying to create pivot table from my query when i choose select * from it works fine but when i tries to select columns as shown in below code it gives me error Incorrect column name select sr,PayDescr,PayMonAmt from (select sr= case...
1 Dec 2014 by /\jmot
DATALENGTH :Returns the number of bytes used to represent any expression.LEN :Returns the number of characters of the specified string expression, excluding trailing blanks.see this, you'll get the...
8 May 2010 by 4277480
Sample table to explain the problem (EmployeeID,EmployeeName,ManagerID)In my item template of my gridView I have a dropDownList which binds as follows:When you choose dataSource I set EmployeeName to be the field that is being displayed and the EmployeeID for the value. Then in the Edit...
15 Oct 2015 by _Amy
Try this:string checkuser = "select count(*) from [Table] where Username='" + tbUsername.Text + "'";//Here "Table" is a predefined word in SQL Sever. You should use it like [Table].//I hope [Table] is your table name[EDIT]Also modify in Button1_Click Event:string insertQuery =...
5 Apr 2014 by _Starbug_
hi friends, i have developed a software with C# and sqlserver 2008. i finished developing of this software and i have problem in installing it. i installed sqlexpress in customer computer and i do not know where i place database(mdf, ldf) files. and what connection string i must use.thank you.
16 Oct 2012 by Aadhar Joshi
As a professional, Which should be better to usestatement in stored procedure or Lock Hints in particular query..SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTEDOR SELECT DISTINCT T.CompanyID ...
17 Oct 2012 by Aadhar Joshi
I agreed Andrew Cherednik. just i want to confirm so i posted the question.Actually where i am working is a large transaction traffic and by using isolation level, sometimes u get data with dirty reads or penthoms. But as far locks are safe.
26 Aug 2012 by Aarti Meswania
string sqlConn = "Data Source=USER-PC\CompanyName;Initial Catalog=rack;User ID=trial;Password=trial112";see data-source value it should be same as you find in login window while open your sql server e.g.'server name' = xyz\SQLEXPRESSthenconnection string should like below string...
3 Jan 2014 by Aarti Meswania
some tips...you should apply index on column which you are using for WHERE clauseand if you are using joins then make sure index is applied to that table's columns' toocheck execution plan if table with more data should not be scan it should be seekDo not include unnecessary...
29 Aug 2019 by Abdalla Ben Omran
How can I add foreign Key reference using Desgin or Query, it doesn't matter just i need to understand it very good . i will be so glad for an explanation about it . I have Order table and has (CustomerFirstName, CustomerLastName,Id,RecivedAt) columns and i have also OrderItem table and has...
3 Mar 2022 by Abderrahmane Radiohead
https://pasteboard.co/EQ5pZtyR...
12 Jan 2016 by Abdul Hannan Ijaz
SQL QUERY SELECT *From TABLEWHERE Datepart(day,@inputdate) = datepart(day, datecolumn)and Datepart(month,@inputdate) = datepart(month, datecolumn)
25 Feb 2015 by Abdulnazark
see the link, it will help you to create a stored procedure in sql serverhttp://vaidymohan.com/2012/05/27/t-sql-function-for-proper-case-format/http://www.wisesoft.co.uk/scripts/tsql_proper_case_udf.aspx
31 Jan 2012 by Abhinav S
@LessonDateID is probably of varchar type.Try using CAST or CONVERT and convert[^] this varchar to DateTime.
20 Apr 2014 by Abhinav S
Tryhttp://www.aspsnippets.com/Articles/How-to-get-Selected-Row-cell-value-from-GridView-in-ASPNet.aspx[^]http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.selectedrow%28v=vs.110%29.aspx[^]http://www.aspsnippets.com/Articles/Selecting-GridView-Row-by-clicking-anywher...
25 Jun 2015 by Abhishek Burrnwal
Change status automatically using trigger from database when system date and date(from database) are equalMy table is-:EmployeeId Status Date1 false 2015-06-25 2 false 2015-06-25 3 false 2015-06-26 4 false 2015-06-26If system date...
25 Dec 2014 by Abhishek kumar121
Hi,I am designing a webpge using asp.net with sql server 2005in back end there is table with followding columnsusername,name,phone1,phone2,age and some others columns are there for storing user's details.I would like to select in such a way so that i entermore than one user name...
27 Oct 2023 by Ahmed Said Oct2023
IF (SELECT T0.[Price] FROM ITM1 T0 INNER JOIN OPLN T1 ON T0.PriceList = T1.ListNum WHERE T1.[ListName] = $[RDR1.U_SBO_PriceList] and T0.[ItemCode] = $[RDR1.ItemCode]) > $[RDR1.PriceBefDi] BEGIN (SELECT T0.[Price] FROM ITM1 T0 INNER JOIN OPLN...
16 Dec 2018 by ahmed_sa
Problem I have table have 20 columns when make select data from new SQL query computer hangs ? what suggestion to make quickly read data from this table and make performance good ? Computer Capability ============== i work on SQL server 2012. select data from this table hangs computer...
17 Jan 2020 by ahmed_sa
problem How to make group by Revision_ID and when repeated display last check date separated by stick | ? I need to group data by Revision_ID that make count to all zpartid every revision_ID Have group of parts . and when revision id repeated two time then lastcheckdate is firstdate |...
14 Mar 2021 by ahmed_sa
How to delete from trades table when Part id not exist on mapping table code type from and code value from? How to delete from table trades where Part id not exist on mapping table on code type from and code value from I work on sql server...
14 Mar 2022 by ahmedbelal
i need solution for repeat items in DataGridView i design form for Patients , i try to show Patient List in dataGridView But when i closed form and open DataGridView For Patient Again , Patient List is repeating for Example i have 10 row for...
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...
4 Apr 2022 by ahmedbelal
i design desktop application for Customer i coding Edit Form My Error is Unable to cast object of type 'System.Int32' to type 'System.Byte[]'. i clicked f10 to debug my Application My Error Here || || || __ \/ byte[] pa_img =...
30 Jan 2017 by Ajit78
I am building a web usercontrol, the user control has a grid which is bound to a SQLDatasource at runtime.The grid on usercontrol allows binding to database Table specified by the user at runtime and the columns are generated at runtime.I have managed to generated the...
4 Aug 2018 by akash dhonde
I guess you have to learn innerjoin,leftjoin that will help you join table and get colume from 2 table with first and display together This is an example try this SELECT Orders.OrderID, Customers.CustomerName FROM Orders INNER JOIN Customers ON Orders.CustomerID = Customers.CustomerID;
6 Apr 2017 by akosisugar
using vsstudio 2010 (c#, windowsforms).. tblcustomer.. [custno, name, age, gender, addr] the sample code i make works fine but it only search through by [name]. i want to make a search|filter by the selected items in my combobox. items in my combobox is my column names of table.. TIA.. What I...
5 Aug 2018 by Akshada Sane
My Current Dataset in Table[0] Id | Name | City 1 | Akshada | Baroda 2 | Rutu | Pune Second Dataset Table [1] Cast Bramhin Rajput Muslim I Want Below Answer Id | Name | City | Cast 1 | Akshada | Baroda | Bramhin 2 | Rutu | Pune |...
5 Aug 2018 by Akshada Sane
Thank you all for helping me i got solution using below code objResult.ResutlDs.Tables[0].Columns.Add("Cast", typeof(string)); for (int i = 0; i
20 Aug 2015 by albader9
Dears,I have grid view which get data from sql data source,and one column are foreign key so i made another sql Data source to get the value,Every thing work fine (getting data and select) except updating the value in drop down list in edit mode,here is summary of my code:Main Data...
22 Aug 2015 by albader9
The issue in my grid view i have key for the same field and it seems that the same data send to stored procedure so no changes.alhamdullah
19 Apr 2014 by AldoBlack
Hello,http://i.stack.imgur...
25 Nov 2020 by Alex Dunlop
Hi, I want to make SQL Compact file path selection dynamic so user would select their own file. I can get user's selected file path using following code: private void FilePath_Click(object sender, EventArgs e) { ...
31 Aug 2015 by Alexander Siniouguine
Entity Framework is very mature framework and will be your best bet. We use it for very large projects and it works just fine. If your application is simple and you want complete control of what happens, then you can use DataReader for the most optimal performance. Stored procedures are anti...
22 Aug 2017 by ambilykk
How to enable SQL Express user
28 Jun 2018 by amit kalshetti
use only one where clause and for another condition use and / or clause not where... Only One where clause we can use otherwise give syntax error.
2 Jul 2017 by an0ther1
I cannot see where you are actually applying the sort. If your event handler grdCustomers_Sorting is not firing then check the GridView has the property AllowSorting=True If your event handler is firing then it is likely to be because you have not applied the sort from e.SortExpression. Review...
27 Mar 2015 by Andrew Augustino
I have a stored procedure which I use to update data through GridView RowUpdating event. What a stored procedure does is that it update a certain record first and then it create another record after successfully update. What happens now is that the first record is updated successfully and then...
22 Jul 2015 by Andy Lanng
Hi,Grouping and aggregates will suit your needs.Groups work by showing a unique column value but actually the rest of the columns are aggregated in that group. You can use aggregate functions on those columns to show min, the lowest of the aggregate values, max, that highest, avg,...
7 Mar 2016 by Andy Lanng
You can't order by state in the row_number because it isn't assessed before the row_number column. The aliases are applied after the query.You have two options:Create another cte before the tempProfile cte that does the alias assignments first:SET @SqlString='WITH aliases as...
21 Mar 2016 by Andy Lanng
Depends how you are running the query, but i would use a CTE to create a table of 4,5,6,7:with num as ( select 4 as num union all select num +1 from test where num
7 Mar 2017 by Andy Lanng
I couldn't get Solution 1 working so I made some tweaks. I hope this is accurate:SELECT Week, TeamNum , Gm1, Gm2, Gm3, Gm1 + Gm2 + Gm3 AS total, @rt := @rt + Gm1 + Gm2 + Gm3 AS rt FROM [tablename] join (SELECT @rt:=0 ) as dummy
27 Sep 2011 by anjankant
Hi All,Can anybody suggest me how we can raise errors in stored procedure in MS SQl Server.Cheers
15 Mar 2014 by ankitkamdar
I Have Installed Sql Server 2008 Full Edition And Also Full-text Search is installed. but the option is disable how to enable it.I Check Via this query SELECT DATABASEPROPERTY('DivineCampus','IsFulltextEnabled')and it return result 1;any one have idea about it than please solve it...
8 Dec 2014 by Ankur\m/
Multiple databases in one connection string doesn't make programming sense. You will need to declare a connection string for each Database.You will have to do this like below in your web.config file:
27 Jun 2011 by AnthonyGC
Hello,First of all. Im very new to ASP.NET so bear with me. Scenario: User is presented with a web page asking for a customer number and then hits a go button. The Go button calls another page and passes on the customer number to that page. The page loads a gridview . THe girdview's...
28 Jun 2011 by AnthonyGC
I am opening a page containing a gridview that is populated using an sqldatasource and a parameter obtain from the the preceding page. When the grid is populated, the user has the option to edit any of the records in the gridview. When the user edits a record and hits update, what really happens...
8 Dec 2014 by Anurag Prajesh
can anyone tell that how can i declare multiple db in single connectionstring in config file.[FROM OP'S COMMENT]I Use two Data Base and connection string is
14 Feb 2014 by Appdev(Icode)
HiTry it out....Insert into orders (orders_id, customers_id, customers_cid, customers_vat_id, customers_name, customers_email_address)select o.*from Test.dbo.orders owhere not exists ( select 1 from CobraDemoData.dbo.Data a ...
30 Nov 2011 by Ariel Riyo
base in my own experience.Call the data from the database again after your statement. that should work.If you use this:protected void btnSave_Click(object sender, EventArgs e){ SqlConnection con = new...
23 Jul 2013 by ArunRajendra
If you want all the fields try this option. SELECT Tbl_Device.Device_Name, Tbl_ReceivedQty.Qty_Device_ID, Tbl_ReceivedQty.Qty_User, Tbl_ReceivedQty.Qty_Date, (select sum(Qty_Received) From Tbl_ReceivedQty where Qty_Device_ID = Tbl_Device.Device_ID) as SubTotal FROM ...
11 Apr 2013 by Ashwin_Nikam
The problem seems the way you check the row that was selected for deletion.Also I cannot see the Content_ID as a bound field to be passed or retrieved in code behind.Should be defined before Content_Name. If e.CommandName.Equals("Delete") Then Dim rowID As...
11 Oct 2013 by ASP.NET Community
SqlDataSource control enables you to use a Web control to access data located in a relational data base, including Microsoft SQL Server and Oracle
11 Oct 2013 by ASP.NET Community
Concept A very common question asked on the ASP.NET Forums is how to bind a ListControl's DataTextField or DataValueField to multiple Columns. The
11 Oct 2013 by ASP.NET Community
The AccessDataSource class is a data source control that works with Microsoft Access databases. Like its base class, SqlDataSource, the
26 Sep 2011 by AswinKrishnan
Please referRAISERROR (Transact-SQL)[^] and HOW TO: Return Errors and Warnings from a SQL Server Stored Procedure in ADO.NET[^]
24 Oct 2014 by ATjong
Different items in RadCombobox in each row of RadGrid with sqlDataSource
7 Apr 2014 by Bh@gyesh
You can pass NULL value to parameter and check in store procedure for that value. If it is NULL then not to pass that parameter in query.If you have more number of parameters, so you can use dynamic SQL.Eg. ALTER PROCEDURE [dbo].[TestSP] @Parameter1 VARCHAR(15) =...
21 Jul 2016 by Bhavesh Chudasama
We shall focus on Day and Month only so we can ignore specific Year. Specify any year just to complete date value (here I used 2016 as year value).SQL Server Query to get employee records having birthday in July month:Select * From tbl_EmployeeMaster Where Convert(Date,...
11 Oct 2016 by Bigprey
I have coded a chatroom using asp.net, C# & MS SQL. I have two Dropdowns for selecting Sports and then another for Sorting the chatrooms based on Users online/total users.It should not repeat the sport twice, which has online users.Thanks in advance and have a nice day ahead.What I...
23 May 2017 by BinnyVishwant
Try this method............ DECLARE @Table1 TABLE(name varchar(20),branch varchar(20),leavetype varchar(20),noofleaves INT) INSERT INTO @Table1 VALUES ('A','CSE','sick',2),('B','IT','cough',1),('A','cse','allergy',4),('B','xx','vomit',2) SELECT name ,STUFF((SELECT ', ' +...
19 Nov 2013 by bowlturner
If they have a 1 = 1 = 1 relationship, then combine the queries (datasources) to give you one result set back. If these are 3 disparate data sets, then you'll need three different gridviews, but you can put them all in one table. A datagrid is similar to a database table, each row...
24 Mar 2017 by Bryian Tan
Not clear what your query is trying to do, look like it is incomplete. I'm guessing this is what you trying to do. Let us know if that not the case.DECLARE @Table1 TABLE (ID INT,Value INT)INSERT INTO @Table1VALUES...
25 Sep 2017 by Bryian Tan
You can use PIVOT function. Here is an example SQL PIVOT Rows to Columns - Stack Exchange Data Explorer[^] DECLARE @test TABLE ( Grado VARCHAR(50), Codigo VARCHAR(50), Nombre VARCHAR(50), Detalle VARCHAR(50), Valor VARCHAR(50) ) INSERT INTO @test SELECT...
2 Oct 2011 by bsb25
I am writing a program to add/edit table enteries in a db in c#I want to know whether we will be able to retrieve table names given a database name,say northwind.please help me in this regard,as i am stuck with it.Thanks in advance.
22 Sep 2010 by butterfly123
Hello Please try to solve my query :1) in form load i populated customer data in datagridview2) after some filtering i am displaying that data in another DGV3) i created a button 4) Now i wanted when i click the button 2 DGV data should save in database tablei tried...
3 Mar 2015 by bvrshavakula
TABLE1 COLUMNS(ID; NAME; AGE; DOB; CDE; CODE1; CODE2)TABLE2 COLUMNS(CDE; DESCRIPTION)TABLE3 COLUMNS(CDE; DESCRIPTION)SELECT TABLE1.NAME, TABLE1.AGE, TABLE2.DESCRIPTION,CASE WHEN TABLE1.CODE1 = NULL THEN NULLELSE (SELECT TABLE3.DESCRIPTION FROM TABLE3 WHERE TABLE1.CODE1 =...
29 Oct 2013 by calmeidaff
Hi everyone,I need your help.So, here it is a short description from what i want do do.I have a gridview that is linked to an sqldatasource. In the page load I get values (rows) from the sqldatasource to an dataview because i want to calculate a value and then show it to the users,...
17 Oct 2012 by chaau
I'd say use the hints. Imagine if the stored procedure is being called by a program that is using a global transaction object used across the program by several threads (I am not saying that it is a right or wrong way to do, I just saw it happen). The isolation level set in your stored procedure...
9 Mar 2016 by CHill60
Try removing the CONVERT. Do that conversion in your presentation layer.Doing something similar with IsActive will probably help too.As an aside, try to avoid using reserved words for column or table names. If you must use them then surround them with square brackets.select ID,...
18 Apr 2017 by CHill60
For want of more information, try this SELECT year, month, count(*) FROM yourTable WHERE month IN (1,3,5,7,9,11) GROUP BY year, month If you want to list the actual records then do this instead: SELECT karno, year, month FROM yourTable WHERE month IN (1,3,5,7,9,11) ORDER BY month, karno
19 Apr 2017 by CHill60
As @RyanDev said, set up the database on the VPN as a Linked Server. There is an article on older versions here on CodeProject How to Config Linked Servers in a Minute[^] and another example here - Setting up a Linked Server for a Remote SQL Server Instance — DatabaseJournal.com[^] You've...
2 May 2017 by CHill60
You are not selecting DepId in CTE t3 [EDIT] As requested, here is my guess at what the modified query should be. Note that I say "guess" because you have still not given me enough any information in the form of table schemas, sample data or expected results.;with t1 as ( SELECT DepId,...
4 May 2017 by CHill60
One of these Codeproject Search results[^] should be what you are after
23 May 2017 by CHill60
Not a solution to this specific problem but a "solution" is the best way to present some advice that might help you when you come across problems later. 1. Consider using short aliases for your tables rather than having to repeat the full table name every time. Vishwanth Raya has used an alias...
3 Nov 2017 by CHill60
You have to distinguish between the two instances of the same table. I will try to help but I'm doing this on a phone... string updateReq = "UPDATE Student SET Student.ID_Request = R1.ID_Request FROM Request R1 where Student.St_Code=Request.St_Code INNER JOIN Request R2 ON Student.ID_Request =...
21 Dec 2018 by CHill60
See this article To BLOB or Not To BLOB: Large Object Storage in a Database or a Filesystem - Microsoft Research[^] Personally I wouldn't store images on a database - all that is going to do is fill up your database very (very) quickly with static data. IMHO a better approach is to store the...
29 Aug 2019 by CHill60
Please do your own research - this is a quick answers forum. The following free resources will explain Foreign Keys fully: Essential Guide to SQL Server FOREIGN KEY Constraint[^] The Essential Guide To SQL Foreign Key Constraint[^]
5 Mar 2020 by CHill60
Hello Infobekcons wrote: I also tried to change column date format to %m %d. but no solution That is impossible. Date columns do not have a "format". See the comments from @maciej-los - you should be storing the data in your table as date NOT...
25 Mar 2020 by CHill60
You get quicker answers if you tell us exactly where the problem occurs. See insert into tSpecializari(codSpec,denumire,codDep) values ('CRS','Caroserii','UDM'), ('MTJ','Montaj','UDM'), ('FAB','Fabricatie','UDM') You have set up a constraint...
10 Mar 2021 by CHill60
Would give you a fully worked example but I'm just about to go into a meeting. I did something similar in my article about loops in SQL Server - see Processing Loops in SQL Server[^] the section about "Traversing a Hierarchy". You can then...
19 Oct 2022 by chilly45
create table customer ( CustomerID int primary key, FtName varchar (48), LtName varchar(48), Email varchar (75), Town varchar (75), Parish varchar(75) ); create table Vehicle( LicensePlate varchar(48) primary key, /*Primary key for...
23 Dec 2014 by Chris Quinn
SELECT CONVERT(DATE,GETDATE())
18 Sep 2015 by Chris Quinn
SQL server can only backup to a drive that is accessible to the server - if you issue a command to backup a database to a folder on the C: drive, it will try to back it up to the C: drive on the database server, NOT to the C: drive on the machine on which the application is running (unless you...
31 Jul 2012 by Christian Graus
You have not written code to show the total, so what did you expect to happen ? You need to add an Eval for the Text, and have it call a method that generates the total and returns it.
4 Jan 2014 by Christian Graus
A clustered index is a BAD idea if your data is often deleted or changed.
14 Sep 2015 by Chriz12
Hello,I have the following code for SqlDataSource:" SelectCommand="SelectDetails" InsertCommand="InsertDetails" UpdateCommand="UpdateDetails" ...
17 Apr 2011 by CSharpNewcomer
I need to retain a gridview's scroll position upon postback from a modalpopup. I tried to store the SelectedIndex in a hidden field and then read the field when the gridview rebinds, but it didn't work. How can I store the Gridview's row position after returning from a modalpopup which...
3 May 2011 by CSharpNewcomer
I found several javascript solutions to this question.
31 Jan 2012 by cutexxbaby
i have this gridview, and i use sqldatasource this is my select command SELECT Date.dateAvailable FROM LessonDate INNER JOIN Date ON LessonDate.dateID = Date.dateID WHERE (LessonDate.lessonID = @lessonID)however when i want to update the dateAvailable column UPDATE ...
24 Jan 2011 by dabbourabd
hi every one i made project in c# to save data in sql server data base "*.mdf"the data i want to save text in about 10000 text filesso my project read each text file and save text in databasebut i notice that when i run my project the memory which "sqlserver.exe" used increased to make...
25 Jul 2016 by Dahal Mahesh
You can either create Login or users for the purpose. If you create a Login, then the login can access all the databases across that server. You can use this T-SQL statement to create a Login CREATE LOGIN readonlylogin WITH password='1234567';Or you can create a user for the database....