MySqlCommand cmd4 = new MySqlCommand("select emp_name from employee_details where emp_category='" + cat[j] + "' and no_ofcassigned=(select MIN(no_ofcassigned) from employee_details)", AL.con); MySqlDataReader reader2 = cmd4.ExecuteReader(); string emp=null; while (reader2.Read()) { emp = reader2[0].ToString(); } reader2.Close();
i am using the above code to fetch the employee name from the datatable according to the minimum value in the column 'no_ofcassigned' in specific category but here if i have more than 3 employees with the same no_ofcassigned is there then the query is not
and I have Admin.aspx page in this page I have EnterBTN Button and 2 Textbox TxtBeh and TxtPass here users enter Behcode and Password and when they click on EnterBTN Button it go to other page below is EnterBTN Event code
here if users enter correct Behcode and password it go to Manager.aspx page...I want if users enter correct behcode and password if their T_name was =Store it go to Manager.aspx page And if their T_name was Estate it go to Estate.aspx page.
I have stored images in folder each images is more than 700kb so datalist binding process became slow.so it is possible that while loading record and corresponding images from folders Can I reduce the image size or compress images so that record fetching become faster.In database i m stroing image path and image is stored in directory.
I have one page on which there are 6 labels and six text box for subject apart from this there are 2 to 3 other text box and label for studnt information. i want to do in such a way that if i enter student enroll no i get his/her name ,dept,sem,all subjects on 6 labels and marks related to subject in text box. In table there are fields
Marks_Entry Student_Enroll Student_Name Sem Program subject Marks
1 sss 1 BCA Basic Communication Skills 75 1 sss 1 BCA Mathematical Foundation 85
[code]...
now when i am entering roll no in form then student name ,program, sem is fetched but in label 1 to label 6 same subject name that is 1st subject name is copied and in text box also first marks are fetched in all textboxes..my c# code on student enroll textbox is this
above method to save and retreve files from sql server database. I have uploaded around 50-60 images as jpg. But it taking so much time to get display online. but it's working faster when accessing from local database.
There's the page where images are displaying [URL]....
Is the speed for images retreiving from sql database is slower as compared to retrieving images from folder..?
.vb code:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then scroll = fillbannerpics() End If End Sub
I would like to know how to display a loading gif picture before an image is fully loaded from server. That images are hold in a datagridview control on a master page. I searched through the web but i am really confused with what should be the possible options. should it be jquery , javascript or sth else ? and how can i implement it ?
I have started learning ASP.net and SQL on and off the past month. I'm trying to make it so that when I select a user from a drop down box (SELECT [UserName], [UserId] FROM [vw_aspnet_Users]) that a label will then display the role next to the selected user. Just in case there is a better way to do it I want it so that the drop down selects the user, the label is just there to provide additional verification that it is the correct user and their current status (admin, moderator, user).
I then want to provide edit and delete buttons (but thats another story!)
I did think something like (SELECT aspnet_Roles.RoleName FROM aspnet_Roles WHERE aspnet_UsersInRoles.RoleId = aspnet_Roles.RoleId) would work but it produces an error.
I m trying to save files like pdf, word, excel etc... into sql express, but m getting this error in my web page:An attempt to attach an auto-named database for file C:Usersmalek.safaDocuments est vbSavingFileInDBSavingFileInDBApp_Dataaspnetdb.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share. m not getting errors inside my code, just this one appearing on the web page.
how I can correct an error. I've built the MVCMusicStore tutorial here:
http://mike-ciccone.com/Store/
The first time I visit the site and attempt a database connection I get this error:
Exception Details: System.Data.SqlClient.SqlException: CREATE DATABASE permission denied in database 'master'.
But when I refresh, it all works fine. I'm at a bit of a loss. I don't believe I'm attempting to create a database, but I realise that the error may not really have anything to do with that. This is hosted at GoDaddy shared hosting. The database was created and I used an SQL script to create the tables initially and populate the data. My connection string works as I can pull data from the database, but I do have a feeling it will be a web.config setting that will correct this.
I have one Store Procedure that generating report ..
For storing the data there , i used many temp. tables. There is many Select Query , little less insert and delete query.
Now if there is huge data around 1 lac in temp table my select query taking to much time and also may be insert and delete query
I added Primary key to all auto Increment Field in temp table. Also defined Clustered index on that primary key as unique Clustered index to improve the performance .
But there is not so much improvement in case of huge temp table.
Right now the whole Store Procedure is taking time to complete around 1.5 days or around 30 hours ..
So i want to increase the performance as much that it completes on nearly 3-4 hours.
I used visual studio 2008 and sql server 2005(for database) in my website project. After finishing my project i used publish to web option and got the files into an folder. I have installed .NET framework ,IIS, i have also set the remote connection ,firewall setting etc. But when i run i.e., In the IIS manager when i click browse it gives me the following error. Can anyone pls tell me what went wrong in this. My code works fine when run on visual studio 2008. Server Error in '/EBUSINESS' Application.
I am trying to publish a 13Mb database on a remote shared SQL server and I keep getting an error:
TITLE: SqlPubWiz ------------------------------
An error occured while trying to publish the following script:IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[GetEvent]') AND type in (N'P', N'PC'))BEGIN EXEC dbo.sp_executesql @statement = N' [code]...
I am creating a sql server database table and when i save the table and give the name to a table "i.e. USER" and then see in the property of that table then the name changes to "[USER]". I have tried lot of time but every time it gets.Plz help mei am also attaching the screen shot of this.
I have .sql database that I created in Visual Web Developer. I have uploaded the .sql file to the host company and they have successfully imported it. When I try to test the database on the server I am getting an error page (listed below). I have inserted a connection string in the web.config file (see below) and isnerted the relevant fields.
I have an asp.net web page which works with a database. When I first upload it I never disposed the connections so after using the different modules of the application for sometime it would suddenly stop working saying the connection pool filled or something like that.To fix it when a user clicked a button I opened the connection, tell the database what I needed and finally disposed the connection.
This seemed to fix everything, in fact you can work with application all you want, the problem comes if you stop using it for certain time.So for instance, I have a module in my webpage where user can capture information for a certain product. When the user clicks in one button the info gets into the database. If the user is continuosly capturing data everything works fine, but if it goes for about 10 min when he clicks the button he will receive an error. To fix this the user has to log-in again.
Every module opens a connection to the database to verify the user identity, but then after it verifies it I dispose the connection so I don't think there is a problem.
We are building MVC application and using LDAP for user authentication (form based). We are able to authenticate user using LDAP. But after user authentication though login page it goes to a data page and try to access SQL server database and get following error message: Cannot open database "HRDataBase" requested by the login. The login failed. Login failed for user 'Anonymous'
Database is having permissions with which user logged in but MVC application is not using the loggedin user identity to connect to the database. I have allowed Login page for anonymous access. but all the other pages are not allowed to have anonymous access. But application is not picking up the login user id. we are using .NET4 on IIS6.0 and windows 2003 with SQL server 2008. In web.config file i am having <identity impersonate="true"> defined.
i have sql server 2008 and visual studia 2008 install in my system when i open a new website project and then use the asp.net administration tool in that when i go for security tab under that one.
i want to enable roles but it displaying error that unable to connect to sql server database.
I am having problem when i was trying to attach .mdf file while create a new connection of SQL server, create a new connection of SQL database file and open the database in Server Explorer. I am using VS 2010 Ultimate and SQL Express 2008 R2.
Here are the error message.
1. Attach .mdf in SQL database file and open the database in Server Explorer
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach+database+Server&LinkId=20476
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
Could not find row in sysindexes for database ID 14, object ID 1, index ID 1. Run DBCC CHECKTABLE on sysindexes. Could not open new database 'BILL'. CREATE DATABASE is aborted. (Microsoft SQL Server, Error: 602)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=602&LinkId=20476
------------------------------ BUTTONS:
OK
i have both sql2000 & 2005 on my system i want attach tha database in sql2005. if in case the database was mad ein sql2000 how do i attach in sql2005 or wht can be done??