473,387 Members | 1,638 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

C#&ADO.NET&SQLServer

I want to insert some strings and images which from
richTextBox into SQLServer.
I could insert it into SQLServer,such as follows:

FileStream s=new FileStream
(init.appPath+"tempQuestion.rtf",FileMode.Open,Fil eAccess.R
ead);
byte []question=new byte[s.Length];
s.Read(question,0,(int)s.Length);
s.Close();
FileInfo fi=new FileInfo
(init.appPath+"tempQuestion.rtf");
if(fi.Exists)
fi.Delete();
sql="insert into aa(image) values('"+ question +"')";

But i couldn't get out from SQLServer,beacuse the values
which get from SQLServer is "System.Byte[]",not the values
which i put in.
Could you show me a sample which can insert image field
into SQLServer and get out from SQLServer.Thank you!
Nov 15 '05 #1
0 1143

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Mary | last post by:
Hi Im trying to connect SqlServer2000 from my C# project. Im using SqlConnection. And when it comes to configuring SqlDataAdapter in the end it says "Deferred prepare could not be...
3
by: E | last post by:
Hi, I'm creating a few pages on my site that you need to login to view. The login pages and the secure pages are .aspx . If I want links at the top of all pages on the site that says either...
12
by: Selva Chinnasamy | last post by:
Hi I am using batch commands against Ms-Access and getting an error Message "Characters found after end of SQL statement." String Here is my sql Dim str_screens As String = "Select * from Screens...
1
by: Lloyd Dupont | last post by:
I never really use SQLExpress before... Anyway I'm trying to something a bit 'advanced' and I'm failing miserably. I have written a BlogEngin a while ago using SqlServer & ASP.NET 2.0 Beta 2 and...
0
by: Ron | last post by:
Hi there My company is developing a web based document archival and retrieval system, using ASP.NET, c# and sqlserver 2000. This development is in testing at present and all looks promising. ...
0
by: aboli | last post by:
How to store audio file in database using .NET & SQLSERVER. i need urgent help
6
by: Noble | last post by:
I am getting ready to write a shareware app in .Net using C# (actually convert a VB shareware). I currently use a third party dll for the data management. It is called the Tsunami Record Manager. I...
3
by: Ludwig Wittgenstein | last post by:
Hello, all. Does anyone know of documentation about implementing a publish- subscribe model between a .NET Web service provide and a Java service consumer? I have this problem I am trying to...
6
by: avcitamer | last post by:
We upgraded our system and problem below occured, pleas help me... Windows 2003 server SP1 When I set a decimal DB field value to "123,32" (using ADODB.recordset ) updated value was ok (123.32)...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.