Saving Picture In PostgreSql

Apr 3, 2004

can ne 1 specify, how to insert a picture into a PostgreSql DB?
pl tell which data type to use and how can i display the picture in my client app

View 1 Replies


ADVERTISEMENT

Saving Picture In A SQL Database (ASP.NET 2.0/C#)

Dec 1, 2005

I'm looking for information that could tell me how to saving picture in a SQL database. The site is build on asp.net 2.0 and c#, and I'm using Visual Web Developer 2005 Express Edition. I would be thankful for some help.

View 1 Replies View Related

Saving Uploaded Picture Filepath To Sql Database

Oct 13, 2007

I am trying to save an uploaded picture filepath to a sql database record.  The record that the filepath will be saved to will be the record determined by the logged in userid.  I get an error stating Object not set to an instance of an object.  This is my code for when the upload button is hitProtected Sub uploadbutton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles uploadbutton.Click
If UploadTest.HasFile = False Then
' No file uploaded!
UploadDetails.Text = "Please first select a file to upload..."
Else
' Display the uploaded file's detailsUploadDetails.Text = String.Format( _
"Uploaded file: {0}<br />" & _"File size (in bytes): {1:N0}<br />" & _"Content-type: {2}", _
UploadTest.FileName, _
UploadTest.FileBytes.Length, _
UploadTest.PostedFile.ContentType)
' Save the fileDim filePath As String =  Server.MapPath("~/ProfilePictures/" & UploadTest.FileName)
UploadTest.SaveAs(filePath)Dim datasources1 As New SqlDataSourcedatasources1.ConnectionString = ConfigurationManager.ConnectionStrings("aspnetdb_connection").ToString()
datasources1.UpdateCommandType = SqlDataSourceCommandType.Text
Dim myUserID As String = Membership.GetUser().ProviderUserKey.ToStringdatasources1.UpdateParameters("userid").DefaultValue = myUserID
datasources1.UpdateCommand = "UPDATE into profile_details (pic) VALUES (@filepath) WHERE ([UserId] = @UserId)"
End If
End Sub
 
Any ideas on what i need to do to fix this?

View 5 Replies View Related

Automating A Query And The Saving Saving Of Subsequent Results

Dec 13, 2007

Hi Guys,

I am trying to automate a basic task using SQL Server 2005 Express.

Currently I have a query script that I run and then save the results as a CSV file. I need to do this on a daily basis and so I am looking to find out how best to go about this. There are a multitude of third party tools that claim to be able to do this - can anyone recommend this or enlighten me of the best way to set up this automation.

All ideas gratefully received!

View 1 Replies View Related

SQL Server 2k Migration To PostgreSQL

Mar 4, 2004

Hi all

I hope you can help me in some way.

Basically for the last 5 months i've developed a SQL 2k db for my company.

All of a sudden they quite fancy using Linux on the server, therefore i would be required to use PostgreSQL instead of SQL Server 2k.

I could do with some advice about how PostgreSQL and SQL Server compare? and how much work would be involved in migrating from one to the other.

Points i've found myself and may be an issue are:

I've used some of SQL Servers XML capabilites and as far as i can tell PostgreSQL doesn't support XML.

I've made extensive use of functions that return table variables etc... is there a similar idea i can use in PostgreSQL?

Extensive use of Stored Procedures and T-SQL etc...

DTS packages. Any equivalent or similar idea?

(ps i've also posted this in the PostgreSQL but since no one replyed i was hoping the sql server boffs could help).

View 3 Replies View Related

What So Special About PostgreSQL And Other RDBMS?

Jul 20, 2005

Beside its an opensource and supported by community, what's the fundamentaldifferences between PostgreSQL and those high-price commercial database (andsome are bloated such as Oracle) from software giant such as Microsoft SQLServer, Oracle, and Sybase?Is PostgreSQL reliable enough to be used for high-end commercialapplication? Thanks

View 49 Replies View Related

Possible To Access Postgresql From Sql Server Ce

Oct 12, 2006

I am wondering if it is possible to access a remote postgresql database using the sql server ce access classes. I do not want to run a postgresql server on windows ce, just access one from a mobile device.

View 7 Replies View Related

Can SQL Server 2K Connect Directly To PostgreSQL?

May 22, 2001

hello everyone!

I'm currently dumping tables from PostgreSQL 7 to SQL Server 2K and I've been wondering if it's possible to create a trigger between the two databases.
..like if there's an insert to a PostgreSQL table, the trigger inserts the same row to the SQL Server table.

If it is possible, please do send me a sample code.

Thanks!

View 1 Replies View Related

Converting Database To MS-SQLServer From PostGRESQL

Nov 23, 2006

Forgive me if this question is a bit too generic, if it is, feel free tojust not respond.I have a database which has been running in PostgreSQL for a number ofyears at this stage which I want to port into MS SQL server.It seems that the SQL that Postgre outputs when I do a backup is notsyntactically correct within MS-SQL server.My question is, does anyone have any documentation on how to convert adatabase from the Postgre platform to SQL server? Is it possible usingan ODBC connection to import a database structure including tabledefinitions, views etc into SQL Server?Failing this, does anyone have any suggestions on where I might start -I did attempt to go through the SQL code and modify it to suit SQLserver, but it's about 3,500 lines of code excluding the insertstatements (which themselves are also wrong) and almost every line needssomething changed when comparing SQL syntax from Postgre to MSSQL serverThanks in advance for any comments/suggestions.Engada.--Posted via a free Usenet account from http://www.teranews.com

View 1 Replies View Related

SQL Server 9.0 (2005) &&amp; PostgreSQL Data Types

Jan 5, 2006

Hi,

I´m building an aplication with VB.net and SQL Server 9, but in the future it will be compatible with PostgreSQL (by another developer), so my question is, if anyone knows what "data types" in SQL Server 9 i must use to maintain compatibility with PostgreSQL, so that when the time come for the conversion i don t have to chage the "Data Types" on each table.

Any help would be apreciated.

View 4 Replies View Related

Import Data From PostgreSQL Into SQL Server 2005

Oct 17, 2007

I am trying to import one table from postgreSQL to SQL Server 2005 using sql server import and export wizard. When i test the connection after providing data source, location, username, password in the Data Link Properties section I get the message "Test Connection Succeeded". As soon as i press next to go onto next step i get the following error.





TITLE: SQL Server Import and Export Wizard
------------------------------

Cannot get string literals from the database connection "Provider=PostgreSQL.1;User ID=sa;Data Source=localhost;Location=TestMasterMap;Extended Properties=".

------------------------------
ADDITIONAL INFORMATION:

Object reference not set to an instance of an object. (DTSWizard)

------------------------------
BUTTONS:

OK
------------------------------



I have tried all sorts of different combinations for these properties but it always fails on this step. Can anybody help me with this?

View 19 Replies View Related

REPLICATION BETWEEN MSSQL SERVER And Postgresql/MySQL/ORACLE???

Nov 27, 2006

Hi Friends,
I want to know if there are a manner of replication(two-way) between MSSQL SERVER and (postgresql or mysql or ORACLE).

Thanks

View 3 Replies View Related

General Advice Needed Regarding MS Access, MS SQL Server, MySQL/PostgreSQL

Nov 15, 2006

I am working on two versions of an application, one of which will be awindows forms application (which will need to be redistributable) andthe other will be a web application.I have MS Visual Studio 2005 (along with the developer's edition of MSSQL Server), but not MS Access. I also have MySQL, PostgreSQL, Sun'sapplication server, Tomcat and Apache web server. I am working onWindows XP Pro, and have installed the .NET 3 SDK and all relevantrelated products I could find (e.g. 2 extensions packages for VisualStudio).I have one MS Access database, to which my users should have read onlyaccess. I have, and have used, a tool for importing MS Accessdatabases into MySQL. I expect that SQL Server has a similar utilityhidden somewhere (where I haven't yet looked, though I HAVE beenlooking - obviously in the wrong places). I have located a similarutility for importing MS Access databases into PostgreSQL. I have notyet decided which servers to use for the web version, but that isanother story, for which I may raise another thread in due course (butI welcome suggestions which may reduce the effort required givenrequired effort for the windows forms app).My problem is for the windows form aplication (intended for use by asingle family). I expect to use ADO.NET. The question is, should Iimport the Access database into MS SQL, and redistribute it, along withMS SQL Server Express (or is that necessary), or distribute it just asan Access database and use the jet engine to access it. A relatedquestion is, "Does ADO.NET support creating new databases for a givenengine?" Imagine a recipe database. It is easy enough to create a SQLscript that creates all the required tables, indices, foreign keys,&c., but can I submit that SQL script to an ADO.NET object, along witha file name, and have it create, e.g., an Access database with thesupplied name. Or do I have to create a database file with nothing init other than the schema?I have more questions, but they'll have to wait.ThanksTed

View 5 Replies View Related

Export Data From Postgresql On Linux To Ms-sqlserver 2000 On Windows

Jul 20, 2005

Hello all,I have been trying to find some information about exporting data frompostgresql on linux to ms-sqlserver 2000 on windows but have not beenable to get hold of any information. I would really appreciate ifsomeone can point me to some source of information.Thanks in advance,Nishy

View 2 Replies View Related

What The Equivalent Command IN SQL SERVER EXPRESS To POSTGRESQL BEGIN ROLLBACK And COMMIT

Jun 27, 2007

Hello,

First of all, this is my first time using SQL SERVER 2005 express, before that i'm using POSTGRESQL database.

I would like to know how what's the equivalent command for "BEGIN","ROLLBACK","COMMIT", these are the POSTGRESQL COMMAND use to start transaction, rollback transaction and commit transaction.

Example when i use this kind of command is . I need to insert data into 3 table. before insert into table1, i issue "begin", start to insert data into table1, if table1 no error, then i proceed to table 2 and table3. if table2 and table3 no error. then issue "commit" to commit the changes. but if any error happen between table1 and table 2 or table 2 and table3, i will issue "rollback" to roll any changes that i make to table1, table2 and table3.

Maybe some one can teach me how to achieve using SQL SERVER 2005 EXPRESS.

Thanks and Regards.

Beh Chun Yit

View 1 Replies View Related

Trying To Upload A Picture To Sql

Sep 23, 2007

I am using the article, "
Storing Binary Files Directly in the Database Using ASP.NET 2.0 By Scott Mitchell "
 
http://aspnet.4guysfromrolla.com/articles/120606-1.aspx
I have tried to modify the code and my datatable to replicate the function, but I am getting an error, "MIMEType" is not a SQL Parameter
 
An SqlParameter with ParameterName 'Type' is not contained by this SqlParameterCollection.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.IndexOutOfRangeException: An SqlParameter with ParameterName 'Type' is not contained by this SqlParameterCollection.Source Error:



Line 53:
Line 54: 'Specify the values for the MIMEType and ImageData parameters
Line 55: e.Command.Parameters("Type").Value = MIMEType
Line 56:
Line 57: 'Load FileUpload's InputStream into Byte arraySource File: E:homeDefaultetances.ushtdocshomeadminaddNews.aspx    Line: 55
Code: Protected Sub AddNewsBut_Click(ByVal sender As Object, ByVal e As System.EventArgs)
If Page.IsValid Then
InsertDs.Insert()
Response.Redirect("~/news/default.aspx")
End If

End Sub

Protected Sub InsertDs_Inserting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceCommandEventArgs)
'Reference the FileUpload control


'Make sure a file has been successfully uploaded
If UploadedFile.PostedFile Is Nothing OrElse String.IsNullOrEmpty(UploadedFile.PostedFile.FileName) OrElse UploadedFile.PostedFile.InputStream Is Nothing Then
Label1.Text = "If there is no photo of this event, please use a stock photo if you have none available. Else, please upload a photo of the event."
e.Cancel = True
Exit Sub
End If

'Make sure we are dealing with a JPG or GIF file
Dim extension As String = Path.GetExtension(UploadedFile.PostedFile.FileName).ToLower()
Dim MIMEType As String = Nothing

Select Case extension
Case ".gif"
MIMEType = "image/gif"
Case ".jpg", ".jpeg", ".jpe"
MIMEType = "image/jpeg"
Case ".png"
MIMEType = "image/png"

Case Else
'Invalid file type uploaded
Label1.Text = "Please use the correct file type: .jpg, .jpe, .gif, or .png."
e.Cancel = True
Exit Sub
End Select

'Specify the values for the MIMEType and ImageData parameters
e.Command.Parameters("Type").Value = MIMEType

'Load FileUpload's InputStream into Byte array
Dim imageBytes(UploadedFile.PostedFile.InputStream.Length) As Byte
UploadedFile.PostedFile.InputStream.Read(imageBytes, 0, imageBytes.Length)
e.Command.Parameters("Photo").Value = imageBytes

End Sub Please help.

View 1 Replies View Related

If There Is No Picture Selected

Apr 2, 2008

Dear readers,
On my page people can opload foto's with a <asp:FileUpload ID="myfile" runat="server" BorderWidth="3px" BorderColor="Silver" BorderStyle="Inset" />
and stored the filePath in the database
Now i want, that when there is no picture selected, the path to Noimage.jpg picture who is in my image map will stored on my datadbase.
my script start like this If Not (myfile.HasFile) Then

////how can i select a standard image from
my imageMap and store path to database /////


Dim cnn As Data.SqlClient.SqlConnection

Dim cmd As Data.SqlClient.SqlCommand

Dim strSQL As String

Dim connString As String = (ConfigurationManager.ConnectionStrings("Personal").ConnectionString)
strSQL = "Insert Into tblMateriaal(ArtikelGroep,Artikelnaam,ArtikelType,ArtikelMaat,Aantal,Prijs,ContactPersoon,EmailAdress,Aanvul) Values(@ArtikelGroep,@ArtikelNaam,@ArtikelType,@ArtikelMaat,@Aantal,@Prijs,@ContactPersoon,@EmailAdress,@Aanvul)"
cnn = New Data.SqlClient.SqlConnection(connString)

cmd = New Data.SqlClient.SqlCommand(strSQL, cnn)

Dim plaatje As New Data.SqlClient.SqlParameter("@plaatje", System.Data.SqlDbType.NVarChar)
plaatje.Value = " "
cmd.Parameters.Add(plaatje)

Dim ArtikelGroep As New Data.SqlClient.SqlParameter("@ArtikelGroep", System.Data.SqlDbType.NVarChar)
ArtikelGroep.Value = ddl1.SelectedValue
cmd.Parameters.Add(ArtikelGroep)

Dim ArtikelNaam As New Data.SqlClient.SqlParameter("@ArtikelNaam", System.Data.SqlDbType.NVarChar)
ArtikelNaam.Value = tb1.Text
cmd.Parameters.Add(ArtikelNaam)


cnn.Open()

cmd.ExecuteNonQuery()

cnn.Close()
End if  Lots of thanks

View 2 Replies View Related

Save Picture As BIT

Apr 6, 2006

I want to save a picture uploaded by the user in BIT in Sql Database ... Help me

View 6 Replies View Related

Picture In Database

Dec 28, 2006

Can i put picture in sql server database but not filename and path. I wantto put complete picture in field in database. Is it possible?

View 2 Replies View Related

Picture Name In Database Show In Asp.net 2.0

Apr 9, 2007

Hi,
 My question is how can i get a page show all of my pictures i got in folder c:..Images? by using Database. Becouse I want some of the pictures to be shown in one page for theirselves.
Database looks like:
ID     |   Pname    |   Pact    |
1      |    picture1  |   Yes     |
2      |    picture2  |   No       |   etc.
 Now i want picture 1 and 2 to be shown in my Allpictures.aspx
I tried by using <asp:repeater...>... But i got a problem when i wanted the <img src=<%#EVAL(Pname)/>... becouse i cant do it that way...
 Thanks,
Even Knutli

View 2 Replies View Related

Storeing Picture In SqlServer ...

Dec 1, 2007

Can any say Is it possible to store a picture in sqlserver?? If it possible then Send me some code in C# to store picture file by browseing from my PC.Also which type of field i have to create to store Picture.
plz help me,..

View 1 Replies View Related

Log Shipping Question - The Big Picture

Apr 24, 2003

I need some advice about the best way to setup log shipping in conjunction with full backups and other system maint. such as DBCC's. I'd like to know what others are doing.

What is your schedule, 24/7, other?
When do you take full backups of the databases? Do you restore these backups to the destination server then startup log shipping again?

I considered doing log ship from 7:00 - 19:00. Then do a full backup at 19:30 that is restored to the destination server. I understand that your schedule may vary due to app. requirements.

I found plenty of info. about the mechanics of setting up log ship but nothing from a broader perspective. If you know of an article that I can reference please pass that on as well.

Sidney Ives
Database Administrator
Sentara Healthcare

View 3 Replies View Related

Sending An Image/Picture Using SSB

Sep 18, 2007

I'v been looking for a sample that illustrate how to send an Image(jpeg/gif/bmp) using SSB. The initiating client should pick an image stored locally on a folder in that machine and send it over to the target broker instance using TCP. The target should verify the contents of the message and then insert the image in a table, which i assume should have a column of type varbinary(max).

Any help would be appreciated.

PapaLee

View 1 Replies View Related

How Can I Insert Picture In Image Field

Feb 6, 2001

I try with textcopy but I did'n do nothing. Please help me

View 1 Replies View Related

Rich TextBox With Picture And Text

Aug 25, 2006

Dear All

I want to create a RichTextBox, and then i want to show picture and Text at a time, suppose

Welcome to MSDN Forum

how can i accompalished this task.

Thanks

View 3 Replies View Related

Problem With The Background Picture In Report

Dec 28, 2007

Hello,
I'd like to use a background picture in my report and I have some problems with its resolution. When it is 72 dpi the quality of printed background picture is very bad and when the resolution is 300 dpi a picture does not hold in one sheet of report. Help me please.

View 1 Replies View Related

Default Value In Picture Column In MSDE SQLServer ???

Jan 5, 2004

Hi!

Can I set a default picture to be a default value in my picture column in my database ???

If so, how ???

View 1 Replies View Related

Inserting Picture Into SQL Server Database Through Table

Jun 19, 2005

How to insert a picture into SQL Server 2000 table?
I want
1)Table structure.
2)Insert statement.
3)One example.

View 1 Replies View Related

How Do I Store An Image/photo/picture In A Database?

Oct 24, 2000

How do I store an image/photo/picture in a database?

I have a database called database1 with a table called table1 like:

Table1:
Personid Name1 Name2 Address

and I want to stora a picture of the person in the database (SQL Sever 7) c:picture.jpg. How could I do that? I would like to use a stored procedure to do it. Something with BLOB?bulk insert? how does it work?

Thanks for you help!

//Carl

View 1 Replies View Related

Erorr When I Try Install SQL 2000 (picture Inclued)

Mar 10, 2007

after its saying 100% installed its doing the next error:

http://img171.imageshack.us/img171/3786/8847ig0.gif

please help!

btw here's the log file

################################################## #############################


Starting Service ...

Hebrew_CI_AS

-m -Q -T4022 -T3659

An error occurred while attempting to start the service (1084)

SQL Server configuration failed.

################################################## #############################

17:04:32 Process Exit Code: (-1)
17:04:40 Setup failed to configure the server. Refer to the server error logs and C:WINDOWSsqlstp.log for more information.
17:04:40 Action CleanUpInstall:
17:04:40 C:WINDOWSTEMPSqlSetupBinscm.exe -Silent 1 -Action 4 -Service SQLSERVERAGENT
17:04:40 Process Exit Code: (1060) the currect service are not found as installed service.

17:04:40 C:WINDOWSTEMPSqlSetupBinscm.exe -Silent 1 -Action 4 -Service MSSQLSERVER
17:04:40 Process Exit Code: (0)
17:04:40 StatsGenerate returned: 2
17:04:40 StatsGenerate (0x80000000,0x1,0xf000000,0x200,1033,303,0x0,0x1,0 ,0,0
17:04:40 StatsGenerate -1,Administrator)
17:04:40 Installation Failed.

View 2 Replies View Related

How To Send Email Using HTML Style With Picture?

Jun 5, 2008

Hi all!

I have a proc which send email as a text. But now I have to rewrite her to send email as html and embed a picture there.

I use DatabaseMail with sp_send_dbmail.
Does anybody know how to sort out it?

If somebody another way to send email as html with picture don't hesitate, say me.

Thanks in advance!

View 10 Replies View Related

Adding Image Or Picture To A Database Record

Jun 17, 2007

Hi,

I am new to SQL Server and I have got this problem and I am wondering if anyone could provide me with a solution, please.

I created a Product database table using Visual Basic 2005 Express and SQL Server 2005 Express. I have just added a new column [Picture] with IMAGE datatype to the database table, which of course, should store an image or picture of a product. I am writing to kindly ask you guys for help.

i) How do I store a picture or image for each record of this column [Picture] of database table? I have tried and all that I can see is < binary data > in the picture column, and when I start the VB 2005 Express form is a blank picture box!

ii) How do I get this image to display on Visual Basic 2005 Express form, so that when a product is selected the product image is displayed too? All text data appears but not the picture!

Your help much appreciated. Thanks.

Paul

View 3 Replies View Related

Embedding Picture In Local Report Header

Aug 29, 2007

Okay. Simple request. I have a local report in my VS2005 project. I want to embed my company logo in the header. How do I do this?? When I put an image item on the page it wants me to put something in the value for this? I've tried sending through a dataset but SSRS can't load data set information into the header! Why is this so complicated? I don't want to embed a dynamic database image, just a static image that will be embedded in my program. Any help on this would be appreciated.

Thanks,

Jon

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved