SapphireSteel Forum
Welcome, Guest. Please login or register.
September 19, 2014, 05:53:04 PM

Login with username, password and session length
Search:     Advanced search
Welcome to the SapphireSteel forum - for discussion of the Sapphire and Amethyst IDEs
4068 Posts in 846 Topics by 703 Members
Latest Member: chris
* Home Help Search Login Register
+  SapphireSteel Forum
|-+  General
| |-+  Sapphire / Ruby In Steel
| | |-+  Problem creating rails app with SQL Server backend
« previous next »
Pages: 1 [2] Print
Author Topic: Problem creating rails app with SQL Server backend  (Read 5674 times)
corix
Newbie
*
Posts: 11


« Reply #15 on: February 03, 2012, 01:25:53 PM »

I'm using Windows 7 64 bit (same as yours) and Windows XP 32 bit machines
Logged
Dermot
Administrator
Hero Member
*****
Posts: 1066


« Reply #16 on: February 03, 2012, 01:42:42 PM »

OK. More progress...

The problem is with the locations. I think it's a 64 bit issue (but not 100% sure). If I hard code the database paths in the master script in the ProgramData directory, I can get it to work.

I changed lines 5 & 8 from

Code:
CREATE DATABASE [$(databaseName)] ON  PRIMARY
( NAME = N'$(databaseName)', FILENAME = N'$(programFiles)\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\$(databaseName).mdf' , SIZE = 2240KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
 LOG ON
( NAME = N'$(databaseName)_log', FILENAME = N'$(programFiles)\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\$(databaseName)_log.LDF' , SIZE = 504KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)

to

Code:
CREATE DATABASE [$(databaseName)] ON  PRIMARY
( NAME = N'$(databaseName)', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\$(databaseName).mdf' , SIZE = 5000KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )

(those are default locations on my machine).

I think the problem might be the programFiles macro. The last time I tested this I was using a 32 bit machine and I've moved to a 64 bit machine recently.

So try editing the sqlserver.sql script (take a copy first)

Anyway, it looks like the problem is with the database paths not being correct in the master script.

Dermot
Logged
corix
Newbie
*
Posts: 11


« Reply #17 on: February 03, 2012, 02:45:24 PM »

I already have the correct path entered in the script but it still failed. Sad
But when I increased the database size to 5000KB just like you did, i was able to finally create the database successfully! Smiley
Thank you so much Dermot!
« Last Edit: February 03, 2012, 03:23:04 PM by corix » Logged
Dermot
Administrator
Hero Member
*****
Posts: 1066


« Reply #18 on: February 03, 2012, 04:07:46 PM »

Yes - it's combination of the two.

We may have been using an out of date location in our tests for a long time. I think that when SQLServer is upgraded, it finds existing locations and uses those.

We'll fix the script in our next bug fix release.

Dermot
Logged
Pages: 1 [2] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!