Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
dr223
Constraint Violating Yak Guru
444 Posts |
Posted - 2010-06-17 : 05:37:38
|
Hi, The syntax below gives me an error; Msg 102, Level 15, State 1, Line 3Incorrect syntax near 'Bulkcolumn'.Insert into dbo.tblUser(Signature)Select * Bulkcolumn from OPENROWSET(BULK N'R:\ODSTbls\Gerry sig2.JPG', SINGLE_BLOB) as Signaturewhere user_name = McCannG I am trying to import an image (signature) to a fieldname called Signature where user_name = McCannG.Siganture has the data type ImageAny help please. Thanks |
|
|
dr223
Constraint Violating Yak Guru
444 Posts |
Posted - 2010-06-17 : 07:09:19
|
| Changed the code to:Insert into dbo.tblUser(Signature)Select * from OPENROWSET(BULK N'R:\ODSTbls\Gerry.JPG', SINGLE_BLOB) as Signaturewhere user_name = McCannGReceived the error- Msg 4861, Level 16, State 1, Line 1Cannot bulk load because the file "R:\ODSTbls\Gerry.JPG" could not be opened. Operating system error code 3(error not found). |
 |
|
|
AndrewMurphy
Master Smack Fu Yak Hacker
2916 Posts |
Posted - 2010-06-17 : 07:21:24
|
| Can the server see the R Drive? or is this a dirve letter visible from your own PC?Does the server have access to this share/directory/file? |
 |
|
|
dr223
Constraint Violating Yak Guru
444 Posts |
Posted - 2010-06-17 : 07:51:27
|
| ok, managed to bring it but when I have the following code Insert into dbo.TblUser(Signature)Select * from OPENROWSET(BULK N'C:\Signatures\Gerry.JPG', SINGLE_BLOB) as signaturewhere user_name = 'McCannG'I receive the error; Msg 207, Level 16, State 1, Line 3Invalid column name 'user_name'.and there is a column name = user_name, when I delete the where clause it creates a new balnk record and signature is popualated accordingly. But I want to update an existing recordthanks |
 |
|
|
AndrewMurphy
Master Smack Fu Yak Hacker
2916 Posts |
Posted - 2010-06-18 : 04:13:30
|
| a) off the wall suggestion - case sensitive database - is the column name matching it's definition?b) how does the JPEG have a column named user_name in it? the WHERE clause applies to your SELECT not the INSERT |
 |
|
|
|
|
|
|
|