Showing posts with label string. Show all posts
Showing posts with label string. Show all posts

Wednesday, March 28, 2012

moving a project to another machine

Hey,
I have copied a C# express edition project from another machine and have opened the project up and changed the connection string but the project is not updating the database when I try to insert values from textboxes in forms. They seem do be getting into the dataset but not the sql datatabase.
I am getting alot of messages saying that it could not find the schema information for the dataset. Could these errors have anything to do with the project?
What else do I have to change in the project?

Thanks in advance.

Hi, Yorick85

What kind of database were you using?

In general, please check the database permission to your local machine. And make sure that connection has been correct.

Thanks

|||Hi,

I am using SQL server 2005 on both machines. How do I check the database permission on my local machine?
Thanks
|||

It depends on what is your connection string security mode, windows Authentication or sql server Authentication?

If it need user name or password in the Authentication, you should check the user and role in Sql Server Management Studio for particular database.

Thanks

sql

moving a project to another machine

Hey,
I have copied a C# express edition project from another machine and have opened the project up and changed the connection string but the project is not updating the database when I try to insert values from textboxes in forms. They seem do be getting into the dataset but not the sql datatabase.
I am getting alot of messages saying that it could not find the schema information for the dataset. Could these errors have anything to do with the project?
What else do I have to change in the project?

Thanks in advance.

Hi, Yorick85

What kind of database were you using?

In general, please check the database permission to your local machine. And make sure that connection has been correct.

Thanks

|||Hi,

I am using SQL server 2005 on both machines. How do I check the database permission on my local machine?
Thanks
|||

It depends on what is your connection string security mode, windows Authentication or sql server Authentication?

If it need user name or password in the Authentication, you should check the user and role in Sql Server Management Studio for particular database.

Thanks

Wednesday, March 7, 2012

move file task using variable

Hi,

Using the 'for each' container, I am setting a user variable (type = string) which will hold the source file name and path of files to process and then move to an archive directory.

In the move file task (which is in the for each loop container) I have set the destination to a file connection, and the source to : Issourcepathvariable=True; sourcevariable=user::sourcefilename

BUT

when I run the package, I get the following error : Error at File System Task : "Source Path" is not valid on operation type "move file".

I have tried all sorts of things relating to expressions etc. but cannot get this to work. I am obviousley doing something fundementally wrong...can anyone help me?

Thanks

Kevin

Kevin,

It looks like you may have a problem in the user::sourcefilename variable. If I were you I would put a breakpoint on the file system task and, when it breaks at debug-time, put a watch on user::sourcefilename. See what teh value in there actually is.

-Jamie

|||

thanks Jamie.

I have removed the file system file task from the container, and run the package with a breakpoint on the begining of every iteration of the loop. By looking at the watch window, I can see that the variable is being set correctly with the first filename in the filesystem folder.

When I add the filemove task however and add the variable as the source, the package seems to want to validate the variables contents before it has been set by the container, and I am therefore getting an error message.

Does this make sense?

Cheers, Kevin

|||

Kevin,

did you try to enter a "default" or "dummy" filename for that? I remember that I had some problems in a similar case...

|||

kevin w wrote:

thanks Jamie.

I have removed the file system file task from the container, and run the package with a breakpoint on the begining of every iteration of the loop. By looking at the watch window, I can see that the variable is being set correctly with the first filename in the filesystem folder.

When I add the filemove task however and add the variable as the source, the package seems to want to validate the variables contents before it has been set by the container, and I am therefore getting an error message.

Does this make sense?

Cheers, Kevin

Kevin,

Yes, that makes perfect sense. Set DelayValidation=TRUE on your File System Task. I *think* that will solve the problem.

-Jamie

|||

Cheers Jamie,

It's always the little things the trip me up!!!!

Your solution worked a treat.

Kevin

|||

Kevin and Jamie

I am trying to move a file from a folder to an archive folder. I do not know how to create an expression. The file name will change everyday. It is a txt file. How can I specify to move a file *.txt from a folder to archive folder. Any help will be greatly appreciated.

Thanks

Annie

|||

AYK wrote:

Kevin and Jamie

I am trying to move a file from a folder to an archive folder. I do not know how to create an expression. The file name will change everyday. It is a txt file. How can I specify to move a file *.txt from a folder to archive folder. Any help will be greatly appreciated.

Thanks

Annie

Annie,

Are you trying to move all files which match the pattern "*.txt"? If so, look into using the MULTIFILE connection manager.

Here in BOL: ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/extran9/html/10bdc56e-c5cd-4ddb-b2f7-375fe57fe8b2.htm

-Jamie

|||

Jamie

Yes I am trying to move all files with *.txt into an archive folder. I understand the use of multifile connection manager but I am not sure how I can associate the connection manager to a File System task to move file. In the file system task, for the source it asks for a single file name and does not allow me to specify the multifile connection manager

Thanks

Annie

|||

Ah yeah, you're right. Sorry about that.

In this case then you will need to use a ForEach loop with the FileEnumerator. Loop over all the *.txt files and move them one by one to your destination.

-Jamie

move file task using variable

Hi,

Using the 'for each' container, I am setting a user variable (type = string) which will hold the source file name and path of files to process and then move to an archive directory.

In the move file task (which is in the for each loop container) I have set the destination to a file connection, and the source to : Issourcepathvariable=True; sourcevariable=user::sourcefilename

BUT

when I run the package, I get the following error : Error at File System Task : "Source Path" is not valid on operation type "move file".

I have tried all sorts of things relating to expressions etc. but cannot get this to work. I am obviousley doing something fundementally wrong...can anyone help me?

Thanks

Kevin

Kevin,

It looks like you may have a problem in the user::sourcefilename variable. If I were you I would put a breakpoint on the file system task and, when it breaks at debug-time, put a watch on user::sourcefilename. See what teh value in there actually is.

-Jamie

|||

thanks Jamie.

I have removed the file system file task from the container, and run the package with a breakpoint on the begining of every iteration of the loop. By looking at the watch window, I can see that the variable is being set correctly with the first filename in the filesystem folder.

When I add the filemove task however and add the variable as the source, the package seems to want to validate the variables contents before it has been set by the container, and I am therefore getting an error message.

Does this make sense?

Cheers, Kevin

|||

Kevin,

did you try to enter a "default" or "dummy" filename for that? I remember that I had some problems in a similar case...

|||

kevin w wrote:

thanks Jamie.

I have removed the file system file task from the container, and run the package with a breakpoint on the begining of every iteration of the loop. By looking at the watch window, I can see that the variable is being set correctly with the first filename in the filesystem folder.

When I add the filemove task however and add the variable as the source, the package seems to want to validate the variables contents before it has been set by the container, and I am therefore getting an error message.

Does this make sense?

Cheers, Kevin

Kevin,

Yes, that makes perfect sense. Set DelayValidation=TRUE on your File System Task. I *think* that will solve the problem.

-Jamie

|||

Cheers Jamie,

It's always the little things the trip me up!!!!

Your solution worked a treat.

Kevin

|||

Kevin and Jamie

I am trying to move a file from a folder to an archive folder. I do not know how to create an expression. The file name will change everyday. It is a txt file. How can I specify to move a file *.txt from a folder to archive folder. Any help will be greatly appreciated.

Thanks

Annie

|||

AYK wrote:

Kevin and Jamie

I am trying to move a file from a folder to an archive folder. I do not know how to create an expression. The file name will change everyday. It is a txt file. How can I specify to move a file *.txt from a folder to archive folder. Any help will be greatly appreciated.

Thanks

Annie

Annie,

Are you trying to move all files which match the pattern "*.txt"? If so, look into using the MULTIFILE connection manager.

Here in BOL: ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/extran9/html/10bdc56e-c5cd-4ddb-b2f7-375fe57fe8b2.htm

-Jamie

|||

Jamie

Yes I am trying to move all files with *.txt into an archive folder. I understand the use of multifile connection manager but I am not sure how I can associate the connection manager to a File System task to move file. In the file system task, for the source it asks for a single file name and does not allow me to specify the multifile connection manager

Thanks

Annie

|||

Ah yeah, you're right. Sorry about that.

In this case then you will need to use a ForEach loop with the FileEnumerator. Loop over all the *.txt files and move them one by one to your destination.

-Jamie