hi,
here i had created a database named "books" and it contains 8tables in sql server 2005. now i want to take a copy of this "books" database in another system which also have sql server2005 as a back end to asp.net. so where i can get this "books". i.e in which folder it will be saved. is it possible to svae this databse or have to svae each queries by which i created tables?
One can never consent to creep,when one feels an impulse to soar
RAMMOHAN
in this computer sqlserver express edition is installed, i want to remove this express becoz in configuration manager it show two SQLSERVER'S are running. when i browse from COMPUTER - 2 for network servers it show server name as HASH/SQLEXPRESS, but not the main SQLSERVER.
COMPUTER -2
IP::::129.100.100.142
COMPUTER NAME::: FEROZ
MEMBER OF WORKGROUP
can anyone help me how to connect these two computers and remove this express edition
I had installed the sample database " AdventureWorks ",but i couldn't find it in SQL Server Management Studio,and I noticed than it was installed into "Microsoft SQL Server 2005 Samples" directory,but not "Microsoft SQL Server" directory,what can I do to find the datebase. I am a beginner,and learning sqlserver by using tutorials,someone help me? many many thanks.
i am using sqlserver2005,in that i am not getting database mail even after enabling in surface area configuration of configaration tool. what is the problem with my sqlserver. Can any one help me ...
As a developer I work on a development Database, and after adding fields to tables, altering SP's , Adding new tables etc. I need to apply the same exact changes to production database.
So far I have been doing this manually, but is it possible to get the list of all alteration from some date onwards as Sql Scripts and run them on the Production server?
Of course doing the alterations in Sql and keeping them in a file might seem like a solution , but it is a tedious process prone to human error.
Is it possible to turn on some database reporting feature that keeps track of modification's applied ?
Is there another way of visioning database structures and applying them?
I am now retrieving the PDF from the database and I am getting an error: Error 1 'GetImages.GetImage(int)': not all code paths return a value I have: int imageid = Convert.ToInt32(Request.QueryString["ACTUAL_IMAGE_PDF"]); And... private SqlDataReader GetImage(int imageid) { Sql Statement... } Could someone help please??
Ok, again, I'm reasonably new to this. I've been trying to display an image stored in SQL in a ASP.NET page. Pretty simple stuff I would have thought. I've read countless examples of how to do this online, and many of them use the same method of displaying the image, but none seem to work for me. The problem seems to lie in the following line of code: Dim imageData As Byte() = CByte(command.ExecuteScalar())Which always returns the error: Value of type 'Byte' cannot be converted to '1-dimensional array of Byte'.Here's the rest of my code, hope someone can help. It's doing my head in! Imports System.Data.SqlClient Imports System.Data Imports System.Drawing Imports System.IOPartial Class _ProfileEditor Inherits System.Web.UI.PageProtected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 'Get the UserID of the currently logged on user Dim NTUserID As String = HttpContext.Current.User.Identity.Name.ToString Session("UserID") = NTUserID Dim Photo As Image = NothingDim connection As New SqlConnection(ConfigurationManager.ConnectionStrings("MyConnectionString").ConnectionString) Dim command As SqlCommand = connection.CreateCommand() command.CommandText = "SELECT Photograph, ImageType FROM Users WHERE UserID = @UserID"command.Parameters.AddWithValue("@UserID", NTUserID) connection.Open()Dim imageData As Byte() = CByte(command.ExecuteScalar())Dim memStream As New MemoryStream(Buffer) Photo = Image.FromStream(memStream) End Sub End Class
Dear Friends, I have read many solution over the net, but since I am unable to utilize anyone according to my needs I am seeking help from you people. I have a table imagedata in sql server 2005 having fields name and imageperson. Name is string and imageperson is Image field. I have successfully stored name of the person and his image in database. I have populated the dataset from codebehind and bind it to the repeater. By writing <%# DataBinder.Eval(Container.DataItem, "name")%>I am a able to retrieve the name of the person. But when I pass photodata as <%#photogen((DataBinder.Eval(Container.DataItem, "imageperson")))%> where photogen is function in code behind having structure public void photogen(byte[] dataretrieved) { Response.BinaryWrite(datarerieved) } But it is giving error at <%#photogen((DataBinder.Eval(Container.DataItem, "imageperson")))%> The best overloaded method match for '_Default.photogen(byte[])' has some invalid arguments AND Cannot convert object to byte[]. Can anyone please provide me working solution with code for aspx page and code behind. Thanks and regards
VWD 2005 Express. I need to retrieve a value from a SQL database from the code behind a page and assign it to a variable. In Microsoft Access I can do this using the DLookup function. What I need to do is get the data that results from the following query into a variable: SELECT [SystemUserId] FROM [SystemUser] WHERE ([Username] = @Username) The name of the data source is SqlDataSource2 Also, in Access I can create a recordset from a query and then process through the recordset. Can that be done in VB code in VWD 2005 Express?
Hi everyoneI created a database graphically in VS2005.Now I want the text version of those DDL(create) commands. Question is where and how are those commands stored in SqlServer I have the management studio too. Any ideas??
Hi. I've been traling the forum and the internet for a striaghtr forward solution on this. I'm trying to do what loads of people have already achieved: retrive images from an SQL database. I have successfully uploaded inages to an "iamges" table, storing the image as SQL type "image", also storing size, type, description, name etc. I want to be able to read one or more of these images (and other data) back from the table. I'm using C#, ASP NET 2.0, SQL, Any examples I've found needed a lot of tweaking, and for some reason or other didn't work! Please don;t just pose yet another URL to an example - I've probably tried it and failed already. I don't mind if I display the images in a GridView or just within an aspx page. Ideally I'd be able to dispaly a few images on a page. I know how to read and display the rest of the data in the "images" table. Can anyone help please? Do you need more info? Thanks in advance, Garrett
I have a SQL database that has Images stored. I am able to read the image from the database and display it. But i am not able to control the size and the position where it is displayed. I want to develop something like a photo album. the images should be displayed in a smaller size. but when the user clicks on the image, it should blow up to its original size. I am struggling with this for some time. Any suggestions as how to develop it??. Any help in this regard would be highly appreciated.
hello i want to know if there is any way to retrieve all the tables for a Database programmatically. i want to connect to a server and select a database .then by selecting the database all it's tables be loaded into a ComboBox(for example)..the tables name i mean. i want to give the user the option to select a table from a database.if it is possible help me my programming language is C#.Net any information is appereicated Somayeh
I am working on a project on PocketPC in which it is required to reteive data from database. I have created database on simulator as .sdf file. I want to retreive data from eVC++ code. How i can do so?
Heres my requirement from a financial analysis im doing...I have just calculated an industry averages on financial ratios...Now i wanna upload this industry average to the system...so that I can compare it to the individual companies' averages after calculating a particular company's average; meaning i wanna be able to call the industry average of a particular ratio (eg Current Ratio) after calculating a company's corresponding ratio...Is there a code fragment i can use for this ?? Thanks in advance...Adam
I've played with various configurations of the MS SQL Server encryption functionality, and come across an embarrassingly easy question that I cannot seem to resolve. How do I retrieve the actual symmetric and asymmetric keys out of the database?
I'd like to explore the possibility of off-loading the encryption/decryption work from the database server to a load-balanced pool of servers. For this model to work the pool would need access to the keys. The symmetric keys currently are generated with the command...
I have inherited a database and with it a set of triggers that are 'apparently' installed. However I have a number of different 'versions' for a specific update trigger and it is not clear from the files which is the latest, hence I am unsure of what 'version' of the trigger is installed in the database itself.
I am trying to retrieve the trigger code from the databse so that i can correctly determine which one of my trigger files is the latest version.
I don't want to end up in a situation where an earlier version of the update trigger is installed as this could wreck the underlying data.
I have tried using the syscomments.text column that relates to the trigger but it only gives me a concatenated version of the sql code and not enough to determine which file version was used for the trigger.
Is there a way of retreiving the entire SQL code that was entered rather than just the first few lines?
OK, this is the scenario. I have a database with many columns ( each a mean value and a standard deviation, and with it a set of coordinates that i want to retrieve ).
Then i have a value that i want to query with the database, by comparing it with the mean and its standard deviation, and it should return a few sets (lets say 2) of coordinates whereby the the value of the mean is closet to the one in the database, in order of nearest value. How should i do it, since i am not using the exact value of the mean in the database?
I know its a bit confusing the way i wrote, but anyone understand wat i am trying to say and can help, i am very grateful. I had googled around for answers but cannot find. Thanks.
well i have got a form which displays some result from the databasse, it runs fi9 in webmatrix, but when i try to run it from my main page and when i click on that button which should displays the aspx page, it gives me this error:
Server Error in '/' Application. --------------------------------------------------------------------------------
Login failed for user 'MUFADDALASPNET'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'MUFADDALASPNET'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
-------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
Hi, How to ennumerate the Rights of an User for all the tables [Select/Insert/Update/Delete] in a database or how to ennumerate/list all the Table rights for a particular user in a database? By User, i mean the Login names [like bill, sam, sa] and not dbowner, public, etc. thanx in advance.
MySql has a statement like: SHOW CREATE TABLE tablename;
that returns the precise CREATE TABLE statement for the specified tablename.
Sql Management Studio also allows scripting Create Statement for any object by right-clicking it. But I want to do this programatically, and fetch CREATE statements for Tables, Procedures & Views.
How can I retrive CREATE statements for Database objects progrmatically in Sql Server???
Currently i am defining a simple relationship between Customers->Orders->Order Details through the Database Diagrams feature in the SQL 2K. Using the Server Explorer, i can see the Database Diagrams, but when i try to "drop" the Database Diagrams into the page, it gives the error message.
I would like to know the procedures to retrieve the database relationships from Database Diagrams and manipulate them through ADO.NET
I prefer to "convert" already defined relationship using SQL Server Database Diagrams into XSD file or probably there is another method to "read" those relationship and manipulate them.
I have a drop down menu for transmission. Inside the drop down menu, there are 1.Any 2.Auto 3.Manual options
Now I want to retrieve from my database, if the client select '1.Any' option. Meaning the output I want it to display all the products which have both auto and manual for transmission.
I have no problem retrieving all the products which either only have auto option or manual option.
I have some VB.NET code to retrieve data from an SQL Server database and display it. The code is as follows: ------------------------------------------------------------------------------------------------------- sw_calendar = calendarAdapter.GetEventByID(cid) If sw_calendar.Rows.Count > 0 Then
lblStartDateText.Text = "*** Not Found ***" lblEndDateText.Text = "*** Not Found ***" lblTitleText.Text = "*** Not Found ***" lblLocationText.Text = "*** Not Found ***" lblDescriptionText.Text = "*** Not Found ***" End If ------------------------------------------------------------------------------------------------------- If all of the fields in the database has values, everything works ok. However, if the title, location or description fields have a null value, I receive the following error message: Unable to cast object of type 'System.DBNull' to type 'System.String'. I've tried a bunch of different things such as:
Adding ".ToString" to the database field, Seeing if the value is null: If sw_calendar(0).description = system.DBnull.value... ...but either I get syntax errors in the code, or if the syntax is ok, I still get the above error message. Can anyone help me with the code required to trap the null within the code example I've provided? I'm sure there are other, and better, ways to code this, but for now I'd really like to get it working as is, and then optimize the code once the application is working (...can you tell I have a tight deadline )
was just wondering if there was an easy way to include a files contents into a web page via a database field. A bit confusing i know.
Here goes:
I got a field called ContentPage stored in a database. (e.g Index.htm)
I want to retrieve this page and then include its contents in my middle div of the webpage like so: <!--#include file="<%=ContentPage%>"-->. Not allowing me to do this as you may have guessed. These pages will either be htm or aspx pages. This would make my life so much easier.
Is there any way of doing this or am i kidding myself.
The Above is my database, I need help in retrieving the X_Co and the Y_Co using values of rcv_A, rcv_B and rcv_C to compare with the Mean_A, Mean_B, Mean_C. The values of rcv_A, rcv_B and rcv_C are instances of values that are not exact of the mean columns , and we want is to compare it against our database and retrieve the row that is the closest to the rcv_A, rcv_B and rcv_C.
Here is an example of what i need. Let's say my rcv_A = 71, rcv_B = 73 and rcv_C = 70.8, so the row with mean value closest would be row 1, followed by row 2, then row 3.
So the result i hope to retrieve is in order of the closest value and i only need the X_Co and Y_Co. This is what i want
I have implemented a caching strategy using the sqlcachedependency and sql server 2005 backend using the broker service.This works fine and well when i am connecting to the SQL Server 2005 under service account that is in the role db_owner. In a production enivironment i am reluctant to do this so i created another service account that only has execute permissions on the stored procedures.When i use this limited service account for my ASP.net web application, the broker service does not send any messages to the web app to invalid the cache. When checking the event log and SQL profiler i get errors all relating to the user not having access to the SqlQueryNotificationService queue. So i did a lot of googling and tried running the grant scripts below with no luck using this limited service account. Keep in mind everything works fine if i use an account with db_owner priviledges. These are the grants i have tried based on numerious articles GRANT CREATE PROCEDURE TO three_d_ss_loginGRANT CREATE QUEUE TO three_d_ss_loginGRANT CREATE SERVICE TO three_d_ss_loginGRANT SUBSCRIBE QUERY NOTIFICATIONS TO three_d_ss_loginGRANT RECEIVE ON QueryNotificationErrorsQueue TO three_d_ss_loginGRANT REFERENCES ON CONTRACT::[http://schemas.microsoft.com/SQL/Notifications/PostQueryNotification] TO three_d_ss_login These are the grants i have tried that does not work GRANT SEND ON SERVICE::SqlQueryNotificationService TO three_d_ss_loginGRANT RECEIVE on SqlQueryNotificationService_DefaultQueue to three_d_ss_loginCan some one suggest what i need to do to get sqlcacheddependencies to work with a sql2005 backend under a limited priviledged service account? ThanksJim
I have the following XML in an XML column in a SQL 2005 Database.<DeliveryList xmlns="http://schemas.adventure-works.com/DeliverySchedule"><Delivery SalesOrderID="43659"><CustomerName>Steve Schmidt</CustomerName><Address>6126 North Sixth Street, Rockhampton</Address></Delivery><Delivery SalesOrderID="43660"><CustomerName>Tony Lopez</CustomerName><Address>6445 Cashew Street, Rockhampton</Address></Delivery></DeliveryList>I need to query that column using the value method to retreive the addressof the first delivery. I come up with this,SELECTDeliveryList.value('data((/DeliveryList/Delivery/Address)[1])','nvarchar(100)')DeliveryAddressFROM Sales.DeliverySchedulebut it tells meXQuery [Sales.DeliverySchedule.DeliveryList.value()]: There is no elementnamed 'DeliveryList'I have tried every permutation of the path and I can not seem to get it towork? Any ideas?
I'm using custom authorization in reporting services 2000 to restrict the users. To do this we created a dll customauthorization.dll and placed it in reportserver bin folder and performed changes in rsreportserver.config, rssrvpolicy.config, and web.config files. Now its time to upgrade our servers to SQLServer 2005. Now in SQLServer2005 what new enhancements were done with respect to security and what all extra steps should i follow to perform the upgradation with custom authorization. Please give me suggestions how to upgrade my reports to SQL2005 so that my custom authorization still works.