Showing posts with label image. Show all posts
Showing posts with label image. Show all posts

Saturday, February 25, 2012

about text ,ntext,image error message

hello all:
my sql server is msde 2000,no sp4 & win xp
when inster data there are some error like this:
location:rebase.cpp:1371Expression:m_nvars>ospid:5 5processid:392
or when delete date :error like this:
location(1:3568).slot 0 for text,ntext,or image node does not exist.
or location:rebase.cpp:1371Expression:m_nvars>ospid:5 5processid:392
I don't know why and how this happend .who can help me ,thx.
Hi
"lxg" wrote:

> hello all:
> my sql server is msde 2000,no sp4 & win xp
> when inster data there are some error like this:
> location:rebase.cpp:1371Expression:m_nvars>ospid:5 5processid:392
> or when delete date :error like this:
> location(1:3568).slot 0 for text,ntext,or image node does not exist.
> or location:rebase.cpp:1371Expression:m_nvars>ospid:5 5processid:392
> I don't know why and how this happend .who can help me ,thx.
>
The error you are getting are from a MFC class, have your run a DBCC CHECKDB
to check the database is ok?
John

about text ,ntext,image error message

hello all:
my sql server is msde 2000,no sp4 & win xp
when inster data there are some error like this:
location:rebase.cpp:1371Expression:m_nvars>ospid:55processid:392
or when delete date :error like this:
location(1:3568).slot 0 for text,ntext,or image node does not exist.
or location:rebase.cpp:1371Expression:m_nvars>ospid:55processid:392
I don't know why and how this happend .who can help me ,thx.Hi
"lxg" wrote:
> hello all:
> my sql server is msde 2000,no sp4 & win xp
> when inster data there are some error like this:
> location:rebase.cpp:1371Expression:m_nvars>ospid:55processid:392
> or when delete date :error like this:
> location(1:3568).slot 0 for text,ntext,or image node does not exist.
> or location:rebase.cpp:1371Expression:m_nvars>ospid:55processid:392
> I don't know why and how this happend .who can help me ,thx.
>
The error you are getting are from a MFC class, have your run a DBCC CHECKDB
to check the database is ok?
John

about text ,ntext,image error message

hello all:
my sql server is msde 2000,no sp4 & win xp
when inster data there are some error like this:
location:rebase.cpp:1371Expression:m_nvars>ospid:55processid:392
or when delete date :error like this:
location(1:3568).slot 0 for text,ntext,or image node does not exist.
or location:rebase.cpp:1371Expression:m_nvars>ospid:55processid:392
I don't know why and how this happend .who can help me ,thx.Hi
"lxg" wrote:

> hello all:
> my sql server is msde 2000,no sp4 & win xp
> when inster data there are some error like this:
> location:rebase.cpp:1371Expression:m_nvars>ospid:55processid:392
> or when delete date :error like this:
> location(1:3568).slot 0 for text,ntext,or image node does not exist.
> or location:rebase.cpp:1371Expression:m_nvars>ospid:55processid:392
> I don't know why and how this happend .who can help me ,thx.
>
The error you are getting are from a MFC class, have your run a DBCC CHECKDB
to check the database is ok?
John

About storing and receiving a location from SQL SERVER.....................

hi friends,

i want to store an image in DB. but most of my friends told that, to store an image in web server then store tat location in a DB and access it anywhere. this is for asp.net in C#-code behind. how to do this? i've a table with a text field. then ......? waiting for ur reply.........

note: i need coding. not by using controls. pls...

Hi,

if you want store the image on DB, you can pass it asSqlDbType.Image, and assign a byte array to the field to be saved.

cmd.Parameters.Add("@.Image",SqlDbType.Image, 0,"Image_Data");

DataRow row = new ...

row.Image_Data =File.ReadAllBytes(pathToFile); //assuming you uploaded it and saved it somewhere.

//your update command

Hope this help

Sunday, February 19, 2012

About receiving an image from SQL server 2000 and displaying it in aspx page..............

hi friends,

i need a code for storing and receiving an image to/fro SQL SERVER 2000 (in C#). i had searched some sites, all are in VB for windows forms not for website. finally i got a code from some site. it is working for storing purpose. not working for receiving purpose. the code for receiving and displaying purpose is

(in a fresh page)

privatevoid Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
MemoryStream stream =new MemoryStream ();
SqlConnection connection =new
SqlConnection (@."server=INDIA\INDIA;database=iSense;uid=sa;pwd=india");
try
{
connection.Open ();
SqlCommand command =new
SqlCommand ("select Picture from Image", connection);
byte[] image = (byte[]) command.ExecuteScalar ();
stream.Write (image,0, image.Length);
Bitmap bitmap =new Bitmap (stream);
Response.ContentType ="image/gif";
bitmap.Save (Response.OutputStream, ImageFormat.Gif);
}
finally
{
connection.Close ();
stream.Close ();
}
}


what s the problem is.......i'm getting an exception at Bitmap instantiation.

(i.e Bitmap bitmap =new Bitmap (stream);)

exception is "Parameter is not valid"

what is the problem with that coding? was it correct? do u have any code for this in C#? if so, pls provide that.....help me......pls..........

Have a look at

http://www.codeproject.com/aspnet/NetPix.asp This article explains an ASP.NET application to view and share photos online.
|||

i got the answer from

http://www.ftponline.com/vsm/2002_07/online/hottips/esposito/

in that program setoffset =0;(they have coded as 78,it will not work.) this is very very important.......now i'm so happy........after a month i got the answer.....

Monday, February 13, 2012

about GetODBCFieldInfo (MFC)

I use ODBC to operate SQL Server 2000. I want to know the data type for each
column in a table. But for image data, text , varchar... , all the return
value are negative.
In addition, how can I realize a table structure copy with ODBC ?
Any suggestion?
Thanks.
UHow about using SQLColumns

about GetODBCFieldInfo (MFC)

I use ODBC to operate SQL Server 2000. I want to know the data type for each
column in a table. But for image data, text , varchar... , all the return
value are negative.
In addition, how can I realize a table structure copy with ODBC ?
Any suggestion?
Thanks.UHow about using SQLColumns