Showing posts with label memo. Show all posts
Showing posts with label memo. Show all posts

Sunday, February 19, 2012

Data type of parameter passing to a stored procedure

Hi,
I pass a paramter of text data type in sql server (which crosspnds Memo data type n Access) to a stored procedure but the problem is that I do not know the crossponding DataTypeEnum to Text data type in SQL Server.

The exact error message that occurs is:

ADODB.Parameters (0x800A0E7C)
Parameter object is improperly defined. Inconsistent or incomplete information was provided.

The error occurs in the following code line:
.parameters.Append cmd.CreateParameter ("@.EMedical", advarwchar, adParamInput)

I need to know what to write instead of advarwchar?
Thanks in advance1) memo and varchar isn't the same!
2) you should specify a size for varchar type!
.parameters.Append cmd.CreateParameter ("@.EMedical", advarwchar, adParamInput, 1000)
or other size instead of 1000

Data type for memo in Ms SQL 7

Hi, currently i am doing discussion forum for my project.
What I want to ask is what data type that I have to set for the message. Previously I am using nvarchar which I thought it would be ok, but when the time I save the message the ENTER command is become space in the database. For example I type

Message 1
Message 2

When I save into the database it become

Message 1 Message 2

I am new in using MS SQL server 7, so please give any suggestion about this.

Thanks,
REDit is not space, it is char(13) in the database.
you can replace it by whatever you want|||hi luber,

How do I replace it to make it saved in order. What data type do I have to set?

Thanks for the reply
RED|||it is ok for database.
If you want to put such a string on the asp.net page
and make new row each time when the user pressed enter

you can use something like this:


select replace(myfield, char(13), '<br>') as formatedfield
from mytable