Web save pic on PostgreSQL

Hi, i am try to save the image on PG but have error the table no found but the table is on the DB object. any idea what is the problems

thanks

For Each f As WebUploadedFile In files

Var nombre As String = f.Name
Var tipo As String = f.MIMEType
Var data As String = f.Data
Var CntID,CustID,PicCounter As String
Var MySql As String

CntID=“1”
CustID=“101”
PicCounter=“1”

Var imgBase64 As String = EncodeBase64(f.Data, 0)

MySql=“INSERT INTO CustPic (CntID,CustID,ImagePic,PicCounter) VALUES (‘” + CntID + “‘,’” + CustID + “‘,’” + imgBase64 + “‘,’” + PicCounter + “’)”
try
session.CoonPGSQL.ExecuteSQL(MySql)
Catch error As DatabaseException
’ DB Connection error
MessageBox(error.Message)

end try

Next

I see you don’t have any code to check if the database connection is available.

I suggest starting with this first check.

thanks, i found the problem, is that all column name have to be low case on postgresql and works.

so now i have to change all db table to low case.

1 Like

you may quote the table names to get the case you want for them
but yes it’s easier to make all lowercase

yes

thanks