Sql2000 Ang Sqlexpress2005

Dec 27, 2007

Hi,

I have a database that was made in sql2000. Now I want to working in sqlexpress 2005. What should do to chande this database in sqlexpress 2005. I want to run this database with asp.net 1.1

Thanks.




Navi

View 1 Replies


ADVERTISEMENT

What's The Case When I Run The Code Is Right In SQLEXPRESS2005 But Wrong In Sql2000

Mar 21, 2007

 Hi everyone
when i run the below code using sql2000 ,the error was occured,anyone can tell me what's wrong and how to solve it thanks
 the error is :
Appointed conversion is invalidation
InvalidCastException: Appointed conversion is invalidation]   PhotoManager.GetPhotos(Int32 AlbumID) +571
[TargetInvocationException: ]   System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +0   System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +72   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +358   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +29   System.Web.UI.WebControls.ObjectDataSourceView.InvokeMethod(ObjectDataSourceMethod method, Boolean disposeInstance, Object& instance) +482   System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +2040   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +17   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70   System.Web.UI.WebControls.GridView.DataBind() +4   System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82   System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +69   System.Web.UI.Control.EnsureChildControls() +87   System.Web.UI.Control.PreRenderRecursiveInternal() +41   System.Web.UI.Control.PreRenderRecursiveInternal() +161   System.Web.UI.Control.PreRenderRecursiveInternal() +161   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360
 
well i plaster the source's code in the below :
1�the test.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="test.aspx.cs" Inherits="test" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server">    <title>æ— æ ‡é¢˜é¡µ</title></head><body>    <form id="form1" runat="server">    <div>        &nbsp;        &nbsp;&nbsp;<asp:GridView ID="GridView1" runat="server" DataSourceID="ObjectDataSource1" AutoGenerateColumns="False">            <Columns>                <asp:BoundField DataField="AlbumCategoryID" HeaderText="AlbumCategoryID" ReadOnly="True"                    SortExpression="AlbumCategoryID" />                <asp:BoundField DataField="Caption" HeaderText="Caption" ReadOnly="True" SortExpression="Caption" />                <asp:BoundField DataField="LastModified" HeaderText="LastModified" ReadOnly="True"                    SortExpression="LastModified" />                <asp:BoundField DataField="ViewCount" HeaderText="ViewCount" ReadOnly="True" SortExpression="ViewCount" />                <asp:BoundField DataField="PhotoID" HeaderText="PhotoID" ReadOnly="True" SortExpression="PhotoID" />                <asp:BoundField DataField="Location" HeaderText="Location" ReadOnly="True" SortExpression="Location" />                <asp:BoundField DataField="AlbumID" HeaderText="AlbumID" ReadOnly="True" SortExpression="AlbumID" />            </Columns>        </asp:GridView>        <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetPhotos"            TypeName="PhotoManager">            <SelectParameters>                <asp:Parameter DefaultValue="1" Name="AlbumID" Type="Int32" />            </SelectParameters>        </asp:ObjectDataSource>    </div>    </form>    </body></html>
 
2�the PhotoManager's class is : public static List GetPhotos(int AlbumID)
{
using (SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["Personal"].ConnectionString))
{
using (SqlCommand command = new SqlCommand("GetPhotos", connection))
{
command.CommandType = CommandType.StoredProcedure;
command.Parameters.Add(new SqlParameter("@AlbumID", AlbumID));
command.Parameters.Add(new SqlParameter("@IsPublic", 1));
connection.Open();
List list = new List();
using (SqlDataReader reader = command.ExecuteReader())
{
while (reader.Read())
{

Photo temp = new Photo(
(int)reader["PhotoID"],
(int)reader["AlbumID"],
(string)reader["Caption"],
(string)reader["Location"],
(int)reader["ViewCount"],
(DateTime)reader["LastModified"],
(int)reader["AlbumCategoryID"]
);

list.Add(temp);



}

}
return list;

}
}


}
 
 
3�photo.cs is using System;
using System.Collections;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.IO;
using System.Web;
public class Photo
{

private int _id;
private int _albumid;
private string _caption;
private string _location;

private int _ViewCount;

private DateTime _LastModified;
private int _AlbumCategoryID;


public int PhotoID { get { return _id; } }
public int AlbumID { get { return _albumid; } }
public string Caption { get { return _caption; } }
public string Location
{
get
{
return _location;
}
}

public int ViewCount
{
get
{
return _ViewCount;
}
}

public DateTime LastModified
{
get
{
return _LastModified;
}
}

public int AlbumCategoryID
{
get
{
return _AlbumCategoryID;
}
}


public Photo(int id, int albumid, string caption, string location, int viewcount, DateTime lastmodified,int AlbumCategoryID)
{
_id = id;
_albumid = albumid;
_caption = caption;
_location = location;
_ViewCount = viewcount;
_LastModified = lastmodified;
_AlbumCategoryID = AlbumCategoryID;

}

}

4�the StoredProcedure
"GetPhotos" is : ALTER PROCEDURE [dbo].[GetPhotos] @AlbumID int, @IsPublic bitAS SELECT [Photos].[AlbumID],[Photos].[PhotoID],[Photos].[Caption],[Photos].
[Location],[Photos].[ViewCount],[Photos].[LastModified], [Albums].[AlbumCategoryID]
 FROM [Photos] LEFT JOIN [Albums]  ON [Albums].[AlbumID] = [Photos].[AlbumID]   WHERE [Photos].[AlbumID] = @AlbumID  AND ([Albums].[IsPublic] =@IsPublic OR [Albums].[IsPublic] = 1)  ORDER BY [Photos].[Caption] ASC
 
RETURN 

View 1 Replies View Related

Upgrading From SqlExpress2005 To SQLEXP2005Advanced

Nov 9, 2006

Hi,

I am newbie with SqlExpress. I have SqlExpress2005 installed on my computer and created some databases on that. They are working fine. Now, for the sake of full text search and other facilities, I would like to upgrade this to SQLEXP2005Advanced.

My questions are:
1. Shall I need to uninstall SqlExpress2005 first to install SqlExpress2005?
2. How I can take backup of existing databases on SqlExpress2005 so that I can immediately restore them on SQLEXP2005Advanced?

Thanks in advance for any help in this regard....

Regs
Tony

View 5 Replies View Related

How To Connect With Sqlexpress2005 && Asp.net For Update Insert Delete Codings

Dec 11, 2007

I want to know about the how to connect with asp.net 2005 and sqlexpress through codings using parameters
import System.Data.SqlClient;
related update delete insert codings ....
How to know about the make the new  connection with different databases sqlserver, oracle mysql....

View 1 Replies View Related

Sql2000 && Sql2005, Want Localhost To Use Sql2000

Sep 17, 2006

 i have sql2000 & sql2005 on the same machine. I am unable to register my localhost in sql2000, get an access denied error. How can I make my localhost use sql2000 database?

View 1 Replies View Related

Migrate SQL2000 To SQL2000

May 13, 2008



i am in the process of Migrating SQL 2000 to my new SQL2000 server i want to know the what would the best way for me to migrate one SQL server to another SQL server on the same network and rename the new server to the old server and bring it up for use in our ecommerce website.

View 10 Replies View Related

ASP.NET 2.0 And SQL2000

Sep 5, 2006

Hi,I have made a web application using SQL Server 2005
Express with a few admin pages that require login. I used the SQL
Server Managment Studio Express to setup users and groups and it works
fine. But the web server has SQL Server 2000 and all I get is a
user id and password to access the database. It seems I cannot use the
Login control I put on my "login.aspx" page becuase it uses the
integrated authentication which chokes on 2000. I am afraid I wonlt be
able to use some of the 2.0 features such as profiles, ... Is
this the way 2.0 works with SQL Server 2000? Should I ditch the ISP if
they only give me a single access to database with no provisions to
create users. (I was told I had to create a "Users" table and manually
assign ids and passwords and that I can only use the user id and
password they supplied to setup the connection string in the script.)I appreciate your help. 

View 2 Replies View Related

SP1 On SQL2000

Mar 8, 2001

Does anyone know when SP1 will be available for SQL2000??

Thanks,
Steve Bajada

View 1 Replies View Related

SQL2000 On NT4

Oct 23, 2000

Are there any advantages/disadvantages of running SQL2K on NT4 as opposed to running on WIN2K?

View 1 Replies View Related

Sql2000

Jan 7, 2008

pls tell me abt log shipping in sql2000

View 1 Replies View Related

MSDE && SQL2000

Jul 13, 2006

I am developing a Crystal Reports App in VS2005 (VB).  I was originally working on an XP machine with MSDE and stored procedures where it worked fine.
I then transferred the development to a Win2003 machine with SQL2000 and am now getting the following error;
 Failed to open a rowset. Description: 'Get_Calls_By_MLO_Date' expects parameter '@DT1' which was not supplied.  Plus some other error detail.
Here is the SP.
CREATE PROCEDURE Get_Calls_By_MLO_By_Date  @DT1 datetime, @DT2 datetimeASSELECT MLO, CallNo, DT, Type FROM ActionsWHERE dt >= @DT1 AND dt <= @DT2 AND ActionID=1 ORDER BY MLO, DTGO
If I transfer everything back to the XP machine it works fine.
Any ideas?
Thanks
Terry.

View 3 Replies View Related

Locks In SQL2000

Jun 1, 2007

How to lock a Row in SQL2000 so that nobody can select that row.
I applied ROWLOCK, but i am not finding the way.
My query is "SELECT * FROM tablename WITH (ROWLOCK)"
Is this the correct way to write locks.
I would be thankful if u help me

View 2 Replies View Related

SQL2000 DTS To Excel

Apr 18, 2006

I am exporting data to an Excel file via a scheduled DTS package. I need to be able to either overwrite the existing Excel file or delete it. I haven't found a way to do this yet. Any help, comments, or direction will be appreciated. TIA
Paul

View 1 Replies View Related

I Need Your Help,About SQL2000 DataInsert

Apr 25, 2006

I want to insert some data into my SQLServer,For example:insert into xcjl(zch,xcsj) values('027741',getdate())
 
but ,the "zch" maybe have a few data,I want to insert these step by step,how can I do?

View 1 Replies View Related

Using Sp_ For User Sp&#39;s In SQL2000

Feb 20, 2001

Hi all,

We're beginning to migrate our 6.5 DB's to SQL2000. A question came up regarding naming conventions for stored procedures. In BOL it says that for SQL2000:

"Stored procedures with the prefix sp_ are first looked up in master. If a user-defined stored procedure has the same name as a system-supplied stored procedure residing in master, SQL Server always finds the system-supplied stored procedure. "

Behavior in 6.5 was the opposite: SQL Server searched the current database followed by a search in master.

We started several months ago renaming user stored procedures to "usp_XXX", but we still have many non-system sp's that still use "sp_". I'm looking for opinions of whether we should bite the bullet now and rename all our non-system sp's at this time; prior to moving our production environment to SQL2000. Will we see a performance gain since SQL will not have to hit master first before going to the current DB?

Any and all opinions welcome!

Thanks,

Tom Rosebrook
EMJ

View 1 Replies View Related

BCP Sql65/sql2000 Help!

Jan 9, 2002

When bcp'ing in data into an sql 6.5 table that is NOT nullable, records in the text file that contain nulls are ommited, but valid records without nulls are inserted.
However, using exactly the same table structure and files on a newly installed sql 2000 server (sp2), as soon as the first invalid record in the text file (i.e. with a null value)is encountered, bcp'ing is terminated and NO records are inserted.
I can't find any option in bcp/sql 2000 to allow me to carry out a load as before.
The help files state that the default no. of invalid records allowed is 10 (both versions sql), and explicitly setting the -m option of bcp to 10 still doesn't work.
Most of the data i receive has at least one duff record
Is there an option in sql 2000 that allows me to have x number of duff records inserted before a full rollsback occurs?

I can't find anything in technet, msdn or books online.

View 1 Replies View Related

SQL2000 And Licensing

Aug 7, 2001

In a replication environment:

Does SQL 2000 standard edition support replication if it would be configured as a subscriber.
Is SQL 2000 Enterprise Edition required for a Publisher and Distributor or can you get away with standard edition.
In a web site environment how many CALs are needed when users access the database via webservers and middleware.

Thanks

View 1 Replies View Related

SQL2000 XML OUTPUT

Jan 18, 2001

I am experimenting with the FOR XML AUTO clause in SQL2000, but instead of nicely structured XML I get one continuous string oftags that can't be parsed by IE5.5

The BOL seem to indicate just running the query in Query Analyser will produce nicely formatted XML output - can anybody tell me what is wrong?

View 1 Replies View Related

Sql2000 Upgrade

Jan 5, 2001

I need some strong points for the management to convince them to upgrade to sql2000 now than waiting for 6 months.
We are currently in process of developing this new product. All development is on sql7. I want to upgrade our database to sql2000 now rather than waiting after the release which might be in another 3 months.

View 2 Replies View Related

SQL2000 Will Not Install

Jan 4, 2003

I crashed my HP portable that has SQL2000 ENT installed and I re-installed XP-Pro +SP1 and when I install SQL2000 ENT it refused to install saying ENT cannot install in this O/S. Did I miss anything ?

I went and checked another XP-Pro W/S and SQL2000 is intalled OK.

Anybody has any idea ?

Thanks,

Frank

View 3 Replies View Related

Sql7 And Sql2000

Aug 26, 2002

Does a script that run with sql7 automatically run with sql2000?
I would like to know if my script will run if I change version.

View 1 Replies View Related

Trigger To Sql2000...

Nov 26, 2003

Is it possible to fire a update trigger from SQL6.5 table to update a SQL2000 server database table field value? (upgrade this 'legacy' to sql2k now is not an option)

If it is not possible, is there a way to accomplish it?

thanks
David

View 3 Replies View Related

SQL2000 Profiler

Jan 24, 2002

I am trying to give developers access to use profiler without giving them sysadmin fixed role is this possible ???

View 3 Replies View Related

SQL2000 Collations

Feb 4, 2002

Hi,
I noticed that when I installed SQL2000,with "typical install",
the default, the following will be used:
SQL collation (dictionary order, case-insensitive, assent sensitive)
sp_helpsort will give
SQL_Latin1_General_CP1_CI_AI

Is there any difference if I choose the "custom install", then and choose
the windows locale which gives the result of sp_helpsort:
Latin1_General_CI_AI

SQL_Latin1_General_CP1_CI_AI is supposed for backward compatibilty, so are
they actually equivalent ??
Any impact or difference we have to be aware of ??
Anyone knows..Thx

View 1 Replies View Related

SQL2000 Upgrade

Jun 28, 2001

I will be upgrading my SQL7 Servers (SP1) to SQL2000 and NT4 to WIN2000 this year. Unfortunately, I will not be able to get new boxes to do this, so I will have to do the upgrades on the systems I have. Our network people have not yet developed a plan for the WIN2K upgrade of our entire network. I will have to upgrade the SQL Servers before they have their plan together. If I want, I can upgrade the SQL Servers to WIN2K before the rest of the network. Assuming that the WIN2K upgrade and the SQL Server upgrade can not be done at the same time, which would be the better order (and why), upgrading to WIN2K and staying at SQL7 first or upgrading to SQL2000 and staying at NT4? The primary goal is to get the indexed views to improve performance on reports and queries.

Thanks for your input.

Roger

View 1 Replies View Related

Bad Performance On SQL2000

Jul 24, 2001

Why would something perform better on SQL 7.0 than SQL 2000?

The system runs fine for about 4 hours, then we will experience across the board timeouts. After stopping and re-starting the SQL Server service, performance is great.

Microsoft is telling us we need more clustered indexes (the database IS poorly tuned, but SQL 7.0 didn't seem to have a problem without them).

Any suggestions? Things are pretty bad here.

SQL2000 sp1 Win2000 sp1 4 CPU box

View 2 Replies View Related

Sql7 And Sql2000 On Same Box

Sep 13, 2001

Does anyone know of any reasons(or implications) why sql7 and sql2000 databases SHOULD NOT be on the same box???

Please advise.

Thanks-

View 1 Replies View Related

ISA2000+SQL2000

Oct 16, 2001

I use ISA2000 +SQL2000. All log write to datebase in SQL. I need help.
I want delete all records old 40 days. I run scripts {delete from MyTable where LogTime < DateAdd(d, -40, GetDate())}, but my trunsaction log state more 1G and task stop with error.
How i can resolve this problem???

View 2 Replies View Related

Upgrade To Sql2000

Feb 1, 2001

Hi,
I am planning to upgrade my sql7.0 with sp2 to sql2000. Pls anyone give me the steps i need to consider and give me some suggestions.
Thanks!

Kavira

View 1 Replies View Related

Migration From SQL 6.5 To SQL2000

Feb 8, 2001

We are beginning our research to migrate from our current SQL 6.5 and are wondering if we should migrate to SQL2000 rather than to SQL 7. First of all, is this possible or will we need to migrate to SQL 7 before migrating to SQL2000? Also where can I find good resources to learn more about the changes in SQL 7 as well as those in SQL 2000?

Any help would be appreciated.

Thanks!

View 1 Replies View Related

Oracle Vs Sql2000

Nov 12, 2004

hi to everyone,
What is faster an oracle or sql2000?

Thanks... :D

View 5 Replies View Related

Bcp Hanging In SQL2000

Feb 11, 2004

I am attempting a very simple bcp out to a text file in SQL 2000 for the first time. I've tried various syntax but the command consistently hangs no matter which i use. Nothing is being directed to the output log............

"bcp rfsspd..bcp_product_view out product.out -T -c -b500 -r>>test.log"

I have no problems with this command in SQL 6.5, could it be initial setup or config of 2000 or something really daft????

Any help greatly appreciated

View 1 Replies View Related

Sendmail In Sql2000

May 2, 2008

hi
how to sendmail in sql2000

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved