Click here to Skip to main content
16,005,697 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: RichTextBox RightToLeft problem Pin
Dave Kreskowiak1-Mar-08 14:43
mveDave Kreskowiak1-Mar-08 14:43 
AnswerRe: RichTextBox RightToLeft problem Pin
helelark1232-Mar-08 3:29
helelark1232-Mar-08 3:29 
Questionwho could show me a sample about delegation in vb.net? Pin
JUNEYT29-Feb-08 3:48
JUNEYT29-Feb-08 3:48 
GeneralRe: who could show me a sample about delegation in vb.net? Pin
darkelv29-Feb-08 3:55
darkelv29-Feb-08 3:55 
QuestionHow to pass the parameter fields to Crystal Report through vb.net? Pin
sathyan_829429-Feb-08 2:31
sathyan_829429-Feb-08 2:31 
AnswerRe: How to pass the parameter fields to Crystal Report through vb.net? Pin
John_Adams29-Feb-08 5:27
John_Adams29-Feb-08 5:27 
AnswerRe: How to pass the parameter fields to Crystal Report through vb.net? Pin
JC.KaNNaN14-Jun-09 23:10
JC.KaNNaN14-Jun-09 23:10 
QuestionSaving image In PostgresSQL Database Pin
nishkarsh_k29-Feb-08 1:57
nishkarsh_k29-Feb-08 1:57 
Hello every one,

I am having a VB.net application with postgresSQL as the Database
I want to store images in the database. Following is the code I am using


Dim inputFileStream As New FileStream("C:\test.gif", FileMode.Open, FileAccess.Read)
Dim reader As New BinaryReader(inputFileStream)
Dim bytes() As Byte
'Dim par As NpgsqlParameter


bytes = reader.ReadBytes(CInt(inputFileStream.Length))

inputFileStream.Close()

Dim Sql As String = "INSERT INTO im_prescription_image VALUES (@st_image_name, @im_image)"
Dim Cmd As New Npgsql.NpgsqlCommand(Sql, cnn)

Cmd.Parameters.Add("@st_image_name", NpgsqlTypes.NpgsqlDbType.Varchar).Value = "as10000000000000"
Cmd.Parameters.Add("@im_image", bytes)

Cmd.ExecuteNonQuery()
cnn.Close()



I am getting this error

Npgsql.NpgsqlException was unhandled
BaseMessage="invalid input syntax for type oid: "\107\111\106\070\071\141\363\002\140\004\367\000\000\000\000\000\200\000\000\000\200\000\200\200\000\000\000\200\200\000\200\270\233\273\272\273\273\274\333\273\276\373\273\300\033\274\302\073\274\304\133\274\306\173\274\135\033\020\000\073""
Code="22P02"
Detail=""
ErrorSql="INSERT INTO im_prescription_image VALUES ('as10000000000000', '\\107\\111\\106\\070\\071\\141\\363\\002\\140\\004\\367\\000\\000\\000\\000\\000\\200\\000\\000\\000\\200\\000\\200\\200\\000\\133\\274\\306\\173\\274\\135\\033\\020\\000\\073')"
File="oid.c"
Hint=""
Line="64"
Message="ERROR: 22P02: invalid input syntax for type oid: "\107\111\106\070\071\141\363\002\140\004\367\000\000\000\000\000\200\000\000\000\200\000\200\200\000\000\000\200\200\000\200\302\073\274\304\133\274\306\173\274\135\033\020\000\073""
Position=""
Routine="oidin_subr"
Severity="ERROR"
Source="Npgsql"
Where=""

Can any one please help me with it.
GeneralRe: Saving image In PostgresSQL Database Pin
Dave Kreskowiak29-Feb-08 3:03
mveDave Kreskowiak29-Feb-08 3:03 
GeneralRe: Saving image In PostgresSQL Database Pin
Christian Graus29-Feb-08 14:37
protectorChristian Graus29-Feb-08 14:37 
GeneralRe: Saving image In PostgresSQL Database Pin
Dave Kreskowiak29-Feb-08 18:30
mveDave Kreskowiak29-Feb-08 18:30 
GeneralRe: Saving image In PostgresSQL Database Pin
nishkarsh_k2-Mar-08 18:48
nishkarsh_k2-Mar-08 18:48 
GeneralRe: Saving image In PostgresSQL Database Pin
Dave Kreskowiak3-Mar-08 14:50
mveDave Kreskowiak3-Mar-08 14:50 
Generalerror accessing MSACCESS database stored in my.resources Pin
MAP Tiger29-Feb-08 1:45
MAP Tiger29-Feb-08 1:45 
GeneralRe: error accessing MSACCESS database stored in my.resources Pin
Dave Kreskowiak29-Feb-08 2:53
mveDave Kreskowiak29-Feb-08 2:53 
GeneralRe: error accessing MSACCESS database stored in my.resources Pin
MAP Tiger3-Mar-08 5:52
MAP Tiger3-Mar-08 5:52 
Questionlist of runtime files Pin
raaman29-Feb-08 1:08
raaman29-Feb-08 1:08 
GeneralRe: list of runtime files Pin
Dave Kreskowiak29-Feb-08 2:55
mveDave Kreskowiak29-Feb-08 2:55 
GeneralMobile Application Pin
Usharva28-Feb-08 23:35
Usharva28-Feb-08 23:35 
GeneralRe: Mobile Application Pin
Dave Kreskowiak29-Feb-08 3:44
mveDave Kreskowiak29-Feb-08 3:44 
GeneralabControl Problem Pin
soniasan28-Feb-08 23:30
soniasan28-Feb-08 23:30 
GeneralRe: abControl Problem [modified] Pin
yogesh_kumar_agarwal28-Feb-08 23:34
yogesh_kumar_agarwal28-Feb-08 23:34 
Questionhow can i use values form one form to another in vb.net Pin
r_mohd28-Feb-08 22:24
r_mohd28-Feb-08 22:24 
AnswerRe: how can i use values form one form to another in vb.net Pin
yogesh_kumar_agarwal28-Feb-08 22:58
yogesh_kumar_agarwal28-Feb-08 22:58 
AnswerRe: how can i use values form one form to another in vb.net Pin
darkelv29-Feb-08 3:38
darkelv29-Feb-08 3:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.