1 Replies - 4959 Views - Last Post: 10 August 2009 - 03:45 AM Rate Topic: -----

#1 cs_starter   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 22
  • Joined: 01-December 08

database post-deployment script

Posted 10 August 2009 - 03:15 AM

Help, I am literally pulling my hair on this...
I added a database to my project, it has post & pre-deployment script on it.
on the post deployment I added a folder named tableScripts.

it appears in the solution like this:
>>Post deployment
>>>>user.sql //the script I want to run
+Script.PostDeployment.sql //the script calling the user.sql script

inside the Script.PostDeployment.sql:

:r .\tableScripts\User.sql

All scripts are running, it is even building and deployed (although no effect in the database table) as sucess but when I try to just execute the post-deployment script it keeps on giving me error:
Please note that when i execute the sql as one line, it does affect the table and inserts data...same with the User.sql, the script is inserting data and all

A fatal error occurred.
The following file could not be read because an error occurred: Could not find a part of the path 'C:\ProjectName\tableScripts\User.sql'.

the path displayed above is not even correct but they say that the error is not in the script..but where is it??!
any clue? suggestion?? I looked and checked the database and the user I am using is correct, I even made a UDL file and tested the connection and it says success...please help.
thank you.

let me just add that it was working before, suddenly it is not! I was able to install it with no problem and use the scripts w/ no hassle..it stopped working when i added another database project using the same user in teh databse(not really sure though if it is related coz i did not try building the orignal script before adding a new one)..what could I have I done wrong?

This post has been edited by cs_starter: 10 August 2009 - 03:23 AM

Is This A Good Question/Topic? 0
  • +

Replies To: database post-deployment script

#2 cs_starter   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 22
  • Joined: 01-December 08

Re: database post-deployment script

Posted 10 August 2009 - 03:45 AM

never mind, i found the answer...the script has no problem at all and he was right when he said there is nothing wrong with it even though it keeps giving me an error message because it is deploying anyway..someone told me that the deploy property should be set to "create a deployment script.sql and deploy to the database" instead of "create a deployment script". I keep forgetting about that, he told me that days ago..stupid me. To go to deploy preperty just right click the database project then properties..go to deploy tab there u can see it.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1