473,662 Members | 2,352 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C#&ADO.NET&SQLS erver

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.rt f",FileMode.Ope n,FileAccess.R
ead);
byte []question=new byte[s.Length];
s.Read(question ,0,(int)s.Lengt h);
s.Close();
FileInfo fi=new FileInfo
(init.appPath+" tempQuestion.rt f");
if(fi.Exists)
fi.Delete();
sql="insert into aa(image) values('"+ question +"')";

But i couldn't get out from SQLServer,beacu se the values
which get from SQLServer is "System.Byt e[]",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 1154

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

Similar topics

0
1152
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 completed.Statement(s) could not be prepared. Invalid object name 'MyTable'" I dont know what is the problem with this? I use OleDbConnection and OleDbAdapter but the result is same. When I try to do these things with code all of them work without problem. My...
3
4045
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 "Login" or "Welcome Bob. Click here to logout", do I have to make all of my pages .aspx or is there a way to keep the unsecure pages HTML and somehow put this dynamic message at the top? Any help is much appreciated.
12
5126
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 Order by ScreenName;Select * from Functions" How can I fix this problem. Any help is greatly appreciated. Selva
1
1433
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 try to rewrite it from scratch (and copy paste). It's hard as I forgot all about ASP.NET... Anyway, right now I'm trying to open a connection to and SqlServerExpress file. To make things a bit more difficult this file might not exist (as a matter...
0
1043
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. Here's some background to the app... Our application stores the document in an image field along with other information related to the document that we index and use to search and
0
965
by: aboli | last post by:
How to store audio file in database using .NET & SQLSERVER. i need urgent help
6
3927
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 know that it will not work in C# so I am looking for a very light-weight database system that will work well in C#. I really don't want to use Access if I can help it and Sql Server Express is really overkill. Does anyone have any suggestions? ...
3
4360
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 solve, and would greatly appreciate it if someone can tell me what the best solution would be for it. I have a .NET 2.0 (ASMX) webservice on a server on a dedicated hosting server, and several clients in different cities running linux servers
6
4910
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) Windows 2003 server SP2 Now when I set a decimal DB field value to "123,32" (using ADODB.recordset ) updated value is (123.32)
0
8432
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8343
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8856
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
7365
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6185
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5653
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4179
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2762
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1992
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.