943,960 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 3454
  • ASP.NET RSS
You are currently viewing page 2 of this multi-page discussion thread; Jump to the first page
Apr 7th, 2009
0

Re: Parameter is no valid

i'm not sure what you are meaning

the actual value? of what?
and what are you wanting to use for testing?
Reputation Points: 133
Solved Threads: 141
Veteran Poster
dickersonka is offline Offline
1,162 posts
since Aug 2008
Apr 7th, 2009
0

Re: Parameter is no valid

we have been provided with a data dump of a postgre sql table into a .psv doc

the data holds informatin on images and the actual image is stored as binary. Now when you open this doc to look at the information i want to see how it compared to that of the data that would be stored in an sql image field.

the reason beimng in that the rouine i have that should open the image from the binary data and save it is failing in the previous errors i have reported and i can only put it down to how the data has been passed to us?

if that makes any sense at all
Reputation Points: 22
Solved Threads: 9
Junior Poster
ninjaimp is offline Offline
129 posts
since Apr 2008
Apr 7th, 2009
0

Re: Parameter is no valid

why can't you just do an import into sql server without going code side?

also are you sure you mean a psv or csv?
Reputation Points: 133
Solved Threads: 141
Veteran Poster
dickersonka is offline Offline
1,162 posts
since Aug 2008
Apr 7th, 2009
0

Re: Parameter is no valid

yes, its a pipe seperated value list

We have gone that route as we are still not sure if the data is correct. Would opening the data as text change the way that the binary information is displayed?
Reputation Points: 22
Solved Threads: 9
Junior Poster
ninjaimp is offline Offline
129 posts
since Apr 2008
Apr 7th, 2009
0

Re: Parameter is no valid

opening it up wouldn't do anything, as long as you don't save it

have you tried to import inside management studio specifying the pipe, or doing something like this?

sql Syntax (Toggle Plain Text)
  1. BULK INSERT MyTableName
  2. FROM 'c:\mydata.psv'
  3. WITH
  4. (
  5. FIELDTERMINATOR = '|',
  6. ROWTERMINATOR = '\n'
  7. )
Reputation Points: 133
Solved Threads: 141
Veteran Poster
dickersonka is offline Offline
1,162 posts
since Aug 2008
Apr 8th, 2009
0

Re: Parameter is no valid

im running visual studio 2008 pro - is the management tool included with that?
Reputation Points: 22
Solved Threads: 9
Junior Poster
ninjaimp is offline Offline
129 posts
since Apr 2008
Apr 8th, 2009
0

Re: Parameter is no valid

i've found out the reason - the data i have is in standard escape format and of course i need to convert this back to its binary equivilent.

Do you know of any built in methods that will take this text and convert it back to binary in either vb or c .net
Reputation Points: 22
Solved Threads: 9
Junior Poster
ninjaimp is offline Offline
129 posts
since Apr 2008
Apr 8th, 2009
0

Re: Parameter is no valid

the management tool you need for the import is just sql management studio or even run it through code
did you try the bulk insert?

escape format meaning?
Reputation Points: 133
Solved Threads: 141
Veteran Poster
dickersonka is offline Offline
1,162 posts
since Aug 2008
Apr 8th, 2009
0

Re: Parameter is no valid

Dont have access to SQL server at the moment and not sure if it would work with the sql express?

the data that has been provided is a table dump of a postgre sql table and the format is plain and uses standard escape sequence similiar to c or perl.

Now i need to convert that back to its binary equivilent.
Reputation Points: 22
Solved Threads: 9
Junior Poster
ninjaimp is offline Offline
129 posts
since Apr 2008
Apr 8th, 2009
0

Re: Parameter is no valid

are you meaning all your double backslashes?

just run a replace on your escaped characters

ASP.NET Syntax (Toggle Plain Text)
  1. Dim fileAsString As String = myString.Replace("\\", "\")
  2.  

i think this is how with vb, more familiar with csharp
Reputation Points: 133
Solved Threads: 141
Veteran Poster
dickersonka is offline Offline
1,162 posts
since Aug 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: ConfigurationElement IsRequired?
Next Thread in ASP.NET Forum Timeline: help required





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC