This is a discussion on "Over my head" within the Introduce Yourself section. This forum, and the thread "Over my head are both part of the Community category.
|
|
|
|
|
![]() |
||
Over my head
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|
|
|||
|
Hi, welcome to the forumz, can you post the error message from your ASP.NET page? ..or maybe show us the code you are using?
|
|
||||
|
<blockquote id="quote" class="ffs">quote:<hr height="1" noshade="noshade" id="quote" />Originally posted by Smokie
Hi, welcome to the forumz, can you post the error message from your ASP.NET page? ..or maybe show us the code you are using? I am so very new to this, so you will see my code is very basic: asp.net - <form id="Form1" method="post" encType="multipart/form-data" runat="server"> <INPUT id="Upload" style="Z-INDEX: 101; LEFT: 112px; POSITION: absolute; TOP: 136px" type="file" name="content" runat="server"><asp:button id="UploadButton" style="Z-INDEX: 104; LEFT: 112px; POSITION: absolute; TOP: 176px" runat="server" Text="Upload" Width="224px"></asp:button></form> vb.net Private Sub UploadButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UploadButton.Click Dim conn As New SqlConnection("integrated security=SSPI;data source=...... etc etc) conn.Open() Dim myCommand As New SqlCommand("proc_UploadDocuments", conn) myCommand.CommandType = CommandType.StoredProcedure Dim parameterContent As New SqlParameter("@Content", SqlDbType.Image, 16) parameterContent.Value = Upload.PostedFile myCommand.Parameters.Add(parameterContent) myCommand.ExecuteNonQuery() conn.Close() End Sub Error Message System.InvalidCastException: Object must implement IConvertible. If you can offer any help on this (or code) I would really really appreciate it! Thanks Morag |
|
||||
|
Morag.... you would be far better storing the image on the webserver and storing the location of that image in the database. This will make serving images 100 times easier.
Is there any specific reason why you would want to store the image inside SQL?
__________________
Rob - SEO Specialist Owner & Founder of Webforumz.com I am currently unavailable for private work
Last Blog Entry: Creative Labs threaten developer over home made drivers.... (Apr 1st, 2008)
|
|
||||
|
Hi, I would be storing many files and images using the 'image' column on the database, I thought it would be better to save on space on the server? I wanted more control over each document, and then have an archive table in the database too.
|
|
||||
|
sure..... you are saving space on the web server.... but decreasing space on your SQL server.
Webspace is generally far cheaper than SQL space.
__________________
Rob - SEO Specialist Owner & Founder of Webforumz.com I am currently unavailable for private work
Last Blog Entry: Creative Labs threaten developer over home made drivers.... (Apr 1st, 2008)
|
|
|||
|
The problem resides here.
SqlDbType.Image is an Array of type Byte, which is a variable-length stream of binary data ranging from 0 to 231 -1 (or 2,147,483,647) bytes. System.Array is declared as: [Visual Basic] <Serializable> MustInherit Public Class Array Implements ICloneable, IList, ICollection, IEnumerable [C#] [Serializable] public abstract class Array : ICloneable, IList, ICollection, IEnumerable We can see that System.Array does not implement IConvertible at all. I think you should not use the way you are using now to update an IMAGE column. Please read the following KB article. Q308042 HOW TO: Read and Write BLOB Data by Using ADO.NET with Visual Basic .NET, http://support.microsoft.com/support.../q308/0/42.asp. HTH. |
|
||||
|
I am way over my head. I can't figure out how to create a button in Fireworks and move it into Dreamweaver. I saved the file, but it looks like I saved it 8 or 9 times when I look in the panel in Dreamweaver.. When I insert it into Dreamweaver, the button does not show up.
Ug adam |
|
|||
|
adam, Welcome to the Forums, but your post is completly unrelated to this thread. Please make a new thread in future.
I don't have Fireworks but I believe that by default is saves in PNG format with a lot of layer data, etc, that most other programs and web browsers will not like. You can also use the export option on the File menu to save the file for the web, as either GIF or JPG and one of those files should definetly appear in Dreamweaver when you import. JPG is the safer choice if your image has a lot of colours. |
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| I seem to have gotten in over my head. | GregoryV | Starting Out | 10 | May 28th, 2007 00:53 |
| No </HEAD> tag? | cj550 | Web Page Design | 4 | May 11th, 2007 21:07 |
| Head scratcher.... | minute44 | Web Page Design | 5 | Jun 2nd, 2006 14:56 |
| head message | csa | Web Page Design | 1 | Jan 17th, 2006 12:30 |
| I am in way over my head!!! Can someone please help!? | blh9901 | Introduce Yourself | 15 | Aug 15th, 2005 21:21 |