Migrate MSSQL 2005 Express -&&> MSSQL 2005 Srv

Apr 25, 2006

Hi!

What is the best way to migrate MSSQL 2005 Express -> MSSQL 2005 Srv?

View 4 Replies


ADVERTISEMENT

Deploying MSSQL 2005 Express DB To MSSQL 2005 WKGP Errors

Sep 29, 2006

DB is developed on local computer with MSSQL 2005 Express. My host is on MSSQL 2005 workgroup. Are they compatible, because I am getting errors? Is my approach wrong?

I have tried several approaches.

A) I created a backup of database on my local, then placed a copy on the server. Then I tried to restore through Server Management Studio. I get this error.

TITLE: Microsoft SQL Server Management Studio

------------------------------

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------

ADDITIONAL INFORMATION:

The backed-up database has on-disk structure version 611. The server supports version 539 and cannot restore or upgrade this database.

RESTORE FILELIST is terminating abnormally. (Microsoft SQL Server, Error: 3169)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=08.00.2039&EvtSrc=MSSQLServer&EvtID=3169&LinkId=20476

------------------------------

BUTTONS:

OK

------------------------------



B: I also have tried copying the database. I put it in the same path as the other databases that can be read with server management studio on the server. Then, tried to get to it through server managements studio and it did not appear. So I tried to attach it. Then I received this error:

TITLE: Microsoft SQL Server Management Studio

------------------------------

Attach database failed for Server 'MROACH1'. (Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach+database+Server&LinkId=20476

------------------------------

ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------

Could not find row in sysindexes for database ID 10, object ID 1, index ID 1. Run DBCC CHECKTABLE on sysindexes.

Could not open new database 'LodgingDB'. 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

------------------------------

C: I have also tried opening the Database, and back up file through Server Management Studio. without success.

D: I also tried Windows and Software update at microsoft update, but no updates were recommended for Version on Server.

I'm surprised this is so hard. My original data base was created in same family of software. 2005 MS SQL Express. I could use some direct help from someone experienced with this. Am I doing it wrong or are the DB versions incompatible.

Mark Roach





View 5 Replies View Related

MSSQL Express 2005 Vs. MSSQL 2000

Jun 15, 2006

Ben writes "I have a sql script that doesn't function very well when it's executed on a SQL 2000 server.

The scrpt looks like this:


---------------------------------------------------------------------------------------------------
USE [master]
GO
IF NOT EXISTS (SELECT * FROM master.dbo.syslogins WHERE loginname = N'SSDBUSERNAME')
EXEC sp_addlogin N'SSDBUSERNAME', N'SSDBPASSWORD'
GO
GRANT ADMINISTER BULK OPERATIONS TO [SSDBUSERNAME]
GO
GRANT AUTHENTICATE SERVER TO [SSDBUSERNAME]
GO
GRANT CONNECT SQL TO [SSDBUSERNAME]
GO
GRANT CONTROL SERVER TO [SSDBUSERNAME]
GO
GRANT CREATE ANY DATABASE TO [SSDBUSERNAME]
GO
USE [master]
GO
If EXISTS (Select * FROM master.dbo.syslogins WHERE loginname = N'SSDBUSERNAME')
ALTER LOGIN [SSDBUSERNAME] WITH PASSWORD=N'SSDBPASSWORD'
GO
GRANT ADMINISTER BULK OPERATIONS TO [SSDBUSERNAME]
GO
GRANT AUTHENTICATE SERVER TO [SSDBUSERNAME]
GO
GRANT CONNECT SQL TO [SSDBUSERNAME]
GO
GRANT CONTROL SERVER TO [SSDBUSERNAME]
GO
GRANT CREATE ANY DATABASE TO [SSDBUSERNAME]
GO
USE [master]
GO
IF EXISTS (select * from dbo.sysdatabases where name = 'ISIZ')
DROP DATABASE [ISIZ]
GO
USE [SurveyData]
GO
exec sp_adduser 'SSDBUSERNAME'
GRANT INSERT, UPDATE, SELECT, DELETE
TO SSDBUSERNAME
GO
USE [SurveyManagement]
GO
exec sp_adduser 'SSDBUSERNAME'
GRANT INSERT, UPDATE, SELECT, DELETE
TO SSDBUSERNAME
---------------------------------------------------------------


I need to be converted to a script that can be executed on both MSSQL 2000 and MSSQL 2005.

I was wondering if somebody there could help me with this problem?!

Thanks,
Ben"

View 1 Replies View Related

Converting SQL Express 2005 To MSSQL 2005 Database

Jul 14, 2007

Hello, im shure this must have been up before and i apologize for that. But i wonder if there is a way to convert the SQL server express databases to MSSQL 2005 databses?

View 3 Replies View Related

Server Configuration For MSSQL 2000 And MSSQL 2005

Sep 6, 2006

Does enabling/disabling Data Execution Prevention have a performanceimpact on SQL 2000 or SQL 2005?For SQL best performance - how should I configure for:Processor Scheduling:Programs or Background servicesMemory Usage:Programs or System Cache

View 9 Replies View Related

Creating Index In MSSQL 2000 From MSSQL 2005

Mar 24, 2008

Hi,

I am a bit new to the MSSQL server. In our application, we use so many SQL queries. To imporve the performance, we used the Database enigine Tuning tool to create the indexes. The older version of the application supports MSSQL 2000 also. To re-create these new indexes, I have an issue in running these "CREATE INDEX" commands as the statements generated for index creation are done in MSSQL 2005. The statements include "INCLUDES" keyword which is supported in MSSQL 2005 but not in MSSQL 2000.

Ex:-

CREATE INDEX IND_001_PPM_PA ON PPM_PROCESS_ACTIVITY

(ACTIVITY_NAME ASC, PROCESS_NAME ASC, START_TIME ASC, ISMONITORED ASC)

INCLUDE

(INSTANCE_ID, ACTIVITY_TYPE, STATUS, END_TIME, ORGANIZATION);


Any help in creating such indexes in 2000 version is welcome.

Thanks,
Suresh.

View 2 Replies View Related

Generating Script For MSSQL 2000 From MSSQl 2005?

May 3, 2008

Hello
We are using SQL 2005 and now we are planning to use SQL 2000. what are the ways to do the process.

We taken the script spcificall for 2000 and run it in SQL 200. But we are getting the error in SCRIPT?

Could you please give me the step to do?

Thanks,
Sankar R

View 6 Replies View Related

Migration MSSQL 2000 32-bit To MSSQL 2005 64-bit

Nov 17, 2007

I've been tasked to move our production databases on MSSQL 2000 to 2005. I've supported MSSQL since version 6.5 and performed migrations to successor versions.

Current Environment is MSSQL 2000 32-bit with current Service Packs.

I've performed mock migrations on Test servers upgrading all Production instances simultaneously from MSSQL 2000 to 2005 32-bit. The Test environment is identical to Production minus server name, IP etc. Also I have a separate server with MSSQL 2005 installed where I use the DETACH / ATTACH and BACKUP / RESTORE method for migration / acceptance testing. There are approximately 30 databases totaling 70 GB. This has gone as expected and fairly successful. Vendors have been coordinated with to update code and staff for acceptance testing.

I'd prefer going directly to MSSQL 2005 64-bit instead if possible due to memory benefits etc. This is where I'd like some feedback prior to borrowing a 64-bit server for testing.

Upgrade options:

1. Is it better to migrate from MSSQL 2000 32-bit to 2005 64-bit via:
a. DETACH / ATTACH
b. BACKUP / RESTORE
c. Is one method more advantageous relating to the end result?
2. Regarding XP clients, have issues been experienced with the default SQL Server driver or is an alternate recommended for XP clients to connect to a MSSQL 64-bit server databases?
3. If you have performed this migration and have relevant experience please pass them along.

View 3 Replies View Related

MSSQL 2005 Express For Web Application?

Sep 10, 2007

Hi,

I'd like to get the experts' advice on whether SQL server 2005 Express edition (SSE) is suitable for medium scale web applications.

I have looked through the reviews of SSE. From what I understand, its limitations over the MSSQL 2005 Standard are:

1. SSE limits database size to 4GB and memory to 1GB.
2. Support for only 1 CPU.
3. No analysis or reporting services.
4. No full text indexing
5. No SQL Agent.

I have a web application that is currently running on a shared web host with a shared MSSQL 2000 database. I'm thinking of shifting to a Virtual Private Server, where I can install SSE for free.

Currently my app has about 14,000 page views a month, and each of them pulls out data from the database. I don't use any analysis or reporting services, or full text indexing or SQL Agent (for now).

My questions:
1. Is 1GB memory sufficient for this type of application?
2. Is there any reason I should not be using SSE for my type of application?

Thanks in advance for the help.

View 5 Replies View Related

VB Studio Express And MSSQL 2005

May 23, 2007

How can I connect to a MSSQL 2005 database with MS VB Studio Express?

View 1 Replies View Related

MSSQL 2000 And SQL Server 2005 Express

Jul 5, 2006

Hi,

Does anybody know if MSSQL 2000 and SQL Server 2005 Express Edition can live together on the same machine?

I need to keep MSSQL 2000 up and running while evaluating the SQL Server 2005 Express Edition.

Thank you,
Paul

View 2 Replies View Related

Problem With Mssql Express 2005 Connections

Jul 20, 2007

i Have this stored procedure below that creates a backujp copy of tblpersons from database db1 into another database db2 with a table1 pressing f5 to create it it goes fine up to around 5 seconds and after that the error below appears and looking at the stored procedure it is not created either. I already activated the default settings SQL Server to allow remote connections but still the error appears.

CREATE PROCEDURE makebackup
BEGIN
SELECT * INTO table1 FROM sql1.database1.dbo.tblpersons
END
GO

OLE DB provider "SQLNCLI" for linked server "amps" returned message "Login timeout expired".
OLE DB provider "SQLNCLI" for linked server "amps" returned message "An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.".

Msg 126, Level 16, State 1, Line 0
VIA Provider impossible to find the module

THANKS
ALEX

View 5 Replies View Related

Cant Connect To MSSQL Server Express 2005

Nov 6, 2006

Hi,

i have installed MS SQL Server Express 2005 on my local machine. Also the managment Studio. I can connect to the MS SQL Server Express 2005 with my c# programm and with the mangament studio.

I have in Windows/system32 the file ntwdblib.dll version 2000.80.2039.0. The TCP/IP and Ip Protocl are active. But i cant connect with php to the local MS SQL Server Express 2005.

My php code is:

mssql_connect('192.168.0.2,1433', 'martin', '');

I get the return code Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: 192.168.0.2,1433 in c:InetpubwwwrootProjekteSkriptemssql_connection.php on line 2


Does anyone know what i made wrong or i have forgotten?

mfg martin

View 5 Replies View Related

Mssql 2005 Express Sever Authentication

Jun 1, 2008

I am new to mssql
I am not sure when I should use windows authentication and when to use sql server authentication
I set it to sql server installation when sql server was installed
I am using it right now on xp-pro platform on my home computer but I also have a website where I would like also to use it
right now I do not have problem accessing the server with windows authentication but I keep getting errors when I switch to sql server authentication
Your help is appreciated
Dory

View 5 Replies View Related

MSSQL 2005 Express Client Installation

Mar 18, 2008

I need to install the 'MSSQL 2005 Express Client' on a computer that will be hosting a copy of an MSSQL 2005 Standard Edition database.
Question: Should I install both the DataBase Services feature and the Client Components feature?

Many thanks, for your help on this.

View 4 Replies View Related

MSSQL Express 2005 Performance So Inconsistent!

Jan 26, 2007

Hi, just wondering if anyone noticed the MSSQL Express 2005 is so inconsistent with its performance. I was testing out a query with 2 joins, with the main table having about 13,600,000 records. With the same criteria value, sometimes it finished executing in 3 secs. sometimes almost a 1 min.

Could it be just the volume of the data? This is really driving me crazy!

Any advise will be greatly appreciated.

Rick..

View 2 Replies View Related

Automatic Nightly Backup With MSSQL 2005 Express

Feb 2, 2007

Hello, we are running MSSQL 2005 express on a windows 2003 machine. I have looked in SQL Server Management Studio for close to an hour and could not find a way to setup automatic backups of databases. Where is this feature, and short tutorial would be great. Thanks!

View 1 Replies View Related

Windows Accounts And User Permissions In MSSQL EXPRESS 2005

May 15, 2008

This may be an idiotic question:

I am attempting to use Visual Web Developer Express with a connection to a SQL Express db from a non-admin account on my XP Pro SP2 machine.

I can do everything in the app under an admin login, but can't seem to configure the db to allow the non-admin account access to the db. I've tried tweaking WMI, using Network Service, Local Service, and Local System with NT AUTHORITY, individual logins, and group permissions, but I'm stuck.

Any thoughts?

View 5 Replies View Related

Format DateTime Coulmn In Mssql 2005 Express Edition

Jan 1, 2008

hi ,
this is my first post on MS Forums .

Q: my question is that , i want to format a date column .. d/m/yyyy .. but there is no any format facility ..



anybody can help me here ??




View 1 Replies View Related

Extracting MS Excel Data In MSSQL Server 2005 Express

Aug 26, 2006

Is there a way of extracting data from MS Excel using MS SQL Server 2005 Express?

View 1 Replies View Related

PHP5, Apache 2.2, MSSQL 2005 Express - Intermittant DB Connection Problem?

Feb 20, 2008

Hi all.

I've had a web service developed in PHP5 running on an Apache webserver for the last 9 months. It handles a lot of XML requests and stores/reads from an MSSQL Server 2005 DB (Express, if that matters).


Occasionally, I will come across the error 'Could not connect to database'. Refreshing the page works 99% of the time removes the error and the system continues as normal. I'd say this is happening about 1/100 requests at the moment, and my client is steadily becoming more irritated by it.


As far as I know, the system settings are mainly stock. It was set up by another developer.


I'm out of ideas with regards to debugging this problem.
Can anybody shed some light, or some possible solutions?




Kind Regards,
Jomn

View 9 Replies View Related

Conversion Of MSSql 2000 Database To MSSQL 2005 Database

Jan 18, 2008

How to convert a database in MSSQL 2000 to MSSQL 2005 database.Is there any tool or documentation available for this?

View 3 Replies View Related

MSSQL 2005 Vs. Visual Studio 2005 Service Pack 1

Mar 14, 2007

Hi,
for some reason, when I've installed visual studio 2005, I didn't install also SQL server.
Than I've updated VS with Service Pack 1 (thank god, I was trying unsucesfully for about 2 weeks :/ ).

Than I want to install MSSQL 2005 and an error came up:

Message displayed to user
SQL Server 2005 Setup has detected incompatible components from beta versions of Visual Studio, .NET Framework, or SQL Server 2005. Use Add or Remove Programs to remove these components, and then run SQL Server 2005 Setup again. For detailed instructions on uninstalling SQL Server 2005, see the SQL Server 2005 Readme.
SQL Server Setup has detected that the following required component is not installed: Microsoft Windows Installer 3.1. To proceed, download and install the Windows Installer 3.1 Redistributable from http://go.microsoft.com/fwlink/?LinkId=50380 , and then run SQL Server Setup again.

1. The http link leads to main page of MS Download Centre.
2. I have Installer 3.1. (version of file c:windowssystem32msiexec.exe said so)
3. I really do not have any beta version of any mentioned SW. I never had.

So I think the issue could be, that installer is checking for not updated version of Visual Studio.
(I was searching through net/msdn and seems no one had this problem (maybe wrong keywords, though) ).

I'm running setup.exe from CD1.

Uninstalling of VS Service Pack 1 is not an option. I really don't want to spent another week by installing it.
Please tell that there is some another way :) .
Thanks a lot.

Here are some logs:

SQLSetup0001_COMP_Datastore.xml

<Datastore>
<Scope Type="SetupBootstrapOptionsScope" Id="2336">
<Property Id="QuietSwitchPresent">0</Property>
<Property Id="LogSwitchPresent">0</Property>
<Property Id="ErrorReporting">0</Property>
<Property Id="DeleteManifestFileMode">1</Property>
<Property Id="MultiInstanceEnabled">0</Property>
<Property Id="ComponentUpdateOnly">0</Property>
<Property Id="ReducedUI">0</Property>
<Property Id="PatchedSetup">0</Property>
<Property Id="LocalSetup">0</Property>
<Property Id="InitiateReboot">0</Property>
<Property Id="HostSetup">1</Property>
<Property Id="RemoteMode">0</Property>
<Property Id="Remote">0</Property>
<Property Id="LoosenedSccChecks">{ }</Property>
<Property Id="DisabledSccChecks">{ }</Property>
<Property Id="LocalRebootPending">1</Property>
<Property Id="CmdLine">********</Property>
<Property Id="InstallMediaPath">Y:</Property>
</Scope>
<Scope Type="SetupStateScope" Id="">
<Property Id="machineName">COMP</Property>
<Property Id="logDirectory">C:Program FilesMicrosoft SQL Server90Setup BootstrapLOG</Property>
<Property Id="logSummaryFilename">C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGSummary.txt</Property>
<Property Id="logSequenceNumber">1</Property>
<Property Id="primaryLogFiles">{ ["C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0001_COMP_Core.log"], ["C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGSummary.txt"] }</Property>
<Property Id="watsonFailedAction">PerformSCCAction2</Property>
<Property Id="watsonFailedActionErrorCode">87</Property>
<Property Id="watsonFailedFunction">sqls::PerformSCCAction::perform</Property>
<Property Id="watsonFailedFunctionErrorCode">87</Property>
<Property Id="watsonSourceFileAndLineNo">setupsqlsetupactions.cpp@1390</Property>
<Property Id="watsonModuleAndVersion">setup.exe@2005.90.1399.0</Property>
<Property Id="watsonMsi">None</Property>
<Property Id="watsonMsiAndVersion">None</Property>
<Property Id="watsonSourceFile">setupsqlsetupactions.cpp</Property>
</Scope>
</Datastore>


SQLSetup0001_COMP_Core.log

Microsoft SQL Server 2005 Setup beginning at Wed Mar 14 18:23:08 2007
Process ID : 2336
Y:setup.exe Version: 2005.90.1399.0
Running: LoadResourcesAction at: 2007/2/14 18:23:8
Complete: LoadResourcesAction at: 2007/2/14 18:23:8, returned true
Running: ParseBootstrapOptionsAction at: 2007/2/14 18:23:8
Loaded DLL:Y:xmlrw.dll Version:2.0.3604.0
Complete: ParseBootstrapOptionsAction at: 2007/2/14 18:23:8, returned true
Running: ValidateWinNTAction at: 2007/2/14 18:23:8
Complete: ValidateWinNTAction at: 2007/2/14 18:23:8, returned true
Running: ValidateMinOSAction at: 2007/2/14 18:23:8
Complete: ValidateMinOSAction at: 2007/2/14 18:23:8, returned true
Running: PerformSCCAction at: 2007/2/14 18:23:8
Complete: PerformSCCAction at: 2007/2/14 18:23:8, returned true
Running: ActivateLoggingAction at: 2007/2/14 18:23:8
Complete: ActivateLoggingAction at: 2007/2/14 18:23:8, returned true
Delay load of action "DetectPatchedBootstrapAction" returned nothing. No action will occur as a result.
Action "LaunchPatchedBootstrapAction" will be skipped due to the following restrictions:
Condition "EventCondition: __STP_LaunchPatchedBootstrap__2336" returned false.
Running: PerformSCCAction2 at: 2007/2/14 18:23:8
Error: Action "PerformSCCAction2" threw an exception during execution.
Return Code: 87
Message displayed to user
SQL Server 2005 Setup has detected incompatible components from beta versions of Visual Studio, .NET Framework, or SQL Server 2005. Use Add or Remove Programs to remove these components, and then run SQL Server 2005 Setup again. For detailed instructions on uninstalling SQL Server 2005, see the SQL Server 2005 Readme.
SQL Server Setup has detected that the following required component is not installed: Microsoft Windows Installer 3.1. To proceed, download and install the Windows Installer 3.1 Redistributable from http://go.microsoft.com/fwlink/?LinkId=50380 , and then run SQL Server Setup again.

Class not registered.
Running: UploadDrWatsonLogAction at: 2007/2/14 18:23:9
Message pump returning: 87

View 2 Replies View Related

Migrate From DB2 To MSSQL

Oct 5, 2006

Dear All,

I am exploring the feasibility of migrating from DB2 (v7) to MSSQL server 2005. My current applications are using UDB, but the DBA wants to change to MSSQL. I believe the impact is huge. For example, how to create schema in MSSQL, how to migrate the data...

Anyone had the experience before? Could kindly suggest some reference for such a migration? Thanks!


Regards,

View 4 Replies View Related

Migrate ASP .net Web Site From Sql 2005 Express To Sql 2005 Standard Edition

Feb 14, 2007

Dear all,I've been using ASP.NET with SQL 2005 express for several months and everything has been fine. Now a customer asks me to install my application on an already existant instance of SQL Server standard edition.I was not able to use nor my application, neither a HelloWorld example.I created a simple Default.aspx that uses a simple database with a single table "Person" via a standard gridview. When I try to open the page I receive an error wich informs me that NT Network service is not able to access database.I've been searching on google for hours and I've tryed unsuccessfully several different way.Can anyone suggest me a scientific procedure to migrate an ASP .net web site from sql 2005 express to sql 2005 standard ?Thank you very Much Fabrizio  

View 1 Replies View Related

Migrate Sybase To MSSQL 7.0

May 11, 2001

Since I'm not a native English, sorry for my poor English.

I want to migrate the current Sybase database to MSSQL 7.0, can anyone tell me the procedure to accomplish. Thank you.

Regards,

Kung Wu

View 2 Replies View Related

How To Migrate From MSDE To MSSQL

Jul 20, 2005

Hi All,I have question and that is-- if i have a database that is implementedin MSDE Now i want the same database in MSSQL. What are the steps i doneed to follow for this.Thanks in AdvanceHoque

View 4 Replies View Related

Migrate Msjet To Mssql Server

Feb 27, 2004

hi, i already have a project in vb6 / msjet 3.5 using dao methods .index .seek , ... I want to convert it to sql , is there a fast way (! converting .index .seek to select...where clauses is time consumming issue) plse reply since the package is already running and i am really desperate to the conversion.

many thanks and appreciation
amatouri

View 1 Replies View Related

Urgent!!! Migrate Sybase To MSSQL 2000

Jun 15, 2001

I've try to use DTS to import data from Sybase 11 database to MSSQL2000 database. After the import process completed, I found that all the Keys, triggers disappeared. How do I solve the problem???


Kung Wu

View 1 Replies View Related

MSSQL 2005

Feb 16, 2007

Hi Guys.If i didnt use MSSQL 2005 Express (say my database was bigger than 4 gig), what license would i need to get for the full version?I'm slightly confused with the CALS (who isnt?).If its on the same server and only IIS / asp.net accessing the database do I only need say 2 CALS?1 for read only1 for read / writewhich I then use ASP.NET to talk to the database?Or do I have to get a per processor license.I would appreciate any help  

View 2 Replies View Related

MySQL To MsSQL 2005

Nov 5, 2007

Hi!
How can i convert this code to work with MsSQL 2005?
/Tomas
 Partial Class skaalb
Inherits System.Web.UI.Page

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim strConnectionString As String
Dim strQuery As String
Dim MyConnection As OdbcConnection
Dim myCommand As OdbcCommand


Dim path As String = Server.MapPath("~/album") & "/"
Dim albName As String = Trim(Replace(txtAlbum.Text, "'", "''"))
Dim folderName As String = Trim(Replace(txtAlbum.Text, "'", "''"))
folderName = Replace(folderName, " ", "_")


Try
If Not My.Computer.FileSystem.DirectoryExists(path & folderName) Then

My.Computer.FileSystem.CreateDirectory(path & folderName)
labelStatus.Text = "Folder <b>" & folderName & "</b> created!"

Dim Beskrivning As String = Trim(Replace(txtBeskrivning.Text, "'", "''"))

strConnectionString = "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=xxxxxxxx; DATABASE=xxxxxxx; UID=xxxxxxxx; PASSWORD=xxxxxxxxx; OPTION=3"
MyConnection = New OdbcConnection(strConnectionString)
MyConnection.Open()
strQuery = "INSERT INTO tbl_albumet(alb_Namn, alb_Beskrivning, alb_Mapp) VALUES (?, ?, ?)"

myCommand = New OdbcCommand(strQuery, MyConnection)
myCommand.Parameters.AddWithValue("?", albName)
myCommand.Parameters.AddWithValue("?", Beskrivning)
myCommand.Parameters.AddWithValue("?", folderName)


myCommand.ExecuteNonQuery()
MyConnection.Close()


Else
labelStatus.Text = "Folder excist, pick another name!"
End If
Catch ex As Exception
labelStatus.Text = "Unable to create folder!"
End Try


End Sub
End Class 

View 1 Replies View Related

IDENTITY_INSERT In MSSQL 2005

Oct 29, 2007

Hi ,

I use MSsql server 2005 with the compatability mode set to 2000.One of the tables, has an IDENTITY Column.I need to restore a earlier backed copy of the table.So, i did the following :

set IDENTITY_INSERT MYTABLE ON

insert into MYTABLE(ID,NAME) values(23,'XYZ')

However, i get the following error :

[Error Code: 544, SQL State: S0001] Cannot insert explicit value for identity column in table 'MYTABLE' when IDENTITY_INSERT is set to OFF.

Can anyone tell me why the set IDENTITY_INSERT does not work ? I need to disable the IDENTITY, do the restore and then enable the IDENTITY again.Also, i need to be able to do this only thorugh SQL issued via JDBC.Please help.

Thanks,

View 3 Replies View Related

IDENTITY_INSERT In MSSQL 2005

Oct 26, 2007

Hi ,

I use MSsql server 2005 with the compatability mode set to 2000.One of the tables, has an IDENTITY Column.I need to restore a earlier backed copy of the table.So, i did the following :

set IDENTITY_INSERT MYTABLE ON

insert into MYTABLE(ID,NAME) values(23,'XYZ')

However, i get the following error :

[Error Code: 544, SQL State: S0001] Cannot insert explicit value for identity column in table 'MYTABLE' when IDENTITY_INSERT is set to OFF.

Can anyone tell me why the set IDENTITY_INSERT does not work ? I need to disable the IDENTITY, do the restore and then enable the IDENTITY again.Also, i need to be able to do this only thorugh SQL issued via JDBC.Please help.

Thanks,
Charu.

View 1 Replies View Related







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