Text Extract In SQL 2000

Sep 10, 2007



I need to pull certain text from a large varchar field with up to 2 GB-per-instance capacity based on COCustServ


Example Entry:
'KSAUNDERS COCustServ 4/11/2006 5:58:31 PM -- patient called to verify exp date based on letter he received.
SJOY RN 3/27/2006 3:46:56 PM -- Test Ordered: 70460/36yof MANTHONY COCustServ 3/27/2006 4:52:58 PM -- site called to chk sts.'


I will need to pull text in two seperate columns before COCustServ (username) and after COCustServ (date) which could appear multiple times in the same entry. In this case I will need to pull

KSAUNDERS 4/11/2006
MANTHONY 3/27/2006


Can anybody help, thanks

View 5 Replies


ADVERTISEMENT

SQL Server 2000 Full Text Search (extract Pieces Of Text)

Sep 12, 2007

Hello everyone !
I want to perform Full Text Search with SQL Server 2000. My documents (.doc, .xls, .txt, .pdf) are stored in a SQL Server field which is binary (the type of the column is image).
I would like to know, how you can extract pieces of text from the documents.
Example:
I have a ASPX page with codebehind in C# making the search in a table in SQL server that is full text indexed.
I make a search looking for the word "peace", than SQL server will take care about the search and return it to me the rows that match with that. But also I'd like to extract the 50 characters before and after where sql server found the word "peace" to show in the result page.
Does anyone has any idea how to work around it ?
 Best regards.
Yannick

View 5 Replies View Related

Data Warehousing :: Query To Extract All Text After Hyphen From String Containing Comma Separated Text

Aug 27, 2015

I have a parameter value as shown below and this is dynamic and can grow 

Example : 101-NY, 102-CA, 165-GA
116-NY, 258-NJ, 254-PA, 245-DC, 298-AL
How do I get the values in the below format
NY,CA,GA   --- each state to be followed with comma and the next state
NY,NJ,PA,DC,AL   --- each state to be followed with comma and the next state

correct query that will fetch  only state names and not the numbers.

View 8 Replies View Related

Extract (text To Column)

Apr 30, 2008

I have a column named DATEID in a table DATA that contains the
following format connected to each other(date and name):

20071030Jones
20071020Smith
20070918Rogers
20080122Williams
etc..

What would the syntax be to insert a column to the right of this one,
and extract the first 8 digits from the data in the DATEID column and
insert that into the new column DATE, therefore making it easier for
me to query against an actual date?

Thanks

View 2 Replies View Related

String Extract From Text

Jun 17, 2014

I have a long text in 'Quote' column as below and i have to extract Trip Duration, Destination and Base Rate from this text. The ‘Base Rate’ will be repeated throughout the text if there is more than one traveler and I only need the first instance.

Begin Quote Calculation<br />
<br />....<br />
Agent Id: 001<br />
Trip Duration: 5days<br />
Relationship Type: Individual<br />....nDestination: AreaTwo<br />
<br ...../>Resolved Trip Type To: 1 with Trip Subtype: 0<br />
Resolved Relationship: Individual....... />
*Base Rates*<br />
Base Rate: 6.070000<br />.....Resolved Trip Type To: 2 with Trip Subtype: 0<br />
Resolved Relationship: Individual....... />
*Base Rates*<br />
Base Rate: 9.070000<br />.....

Result

Trip Duration: 5 days
Destination: AreaTwo
Base Rate: 6.070000

View 3 Replies View Related

How To Extract Data From Delimited Text!!!

Jan 8, 2008



First of all I am a novice here. I am working on a table with a column of URL. I want to seperate the data in the URL delimited by '/'.
Eg:
http://www.simpletech.com/upgrades/aopen/s661fxm/s661fxmintelp4/

Here I want aopen as manufacturer, s661fxm as model_number and intelp4 as submodel_number.
I solved this problem in Oracle using substring and instring. But I have no ides how to achieve this in SQL server.
Please..advice me.
Thanks in advance.

View 17 Replies View Related

SQL Server 2012 :: Extract Text From Numbers

Oct 20, 2014

I have a field which contains something like prj(5616) .

I have been assigned to display the actual name and not the text with the number.

Example: if prj(8616) is called Soccer , then I want display Soccer instead of prj(8616).

View 9 Replies View Related

How Extract The Data Of TFINF When Doing Text Mining? Thanks

Jul 12, 2007

How Extract the data of TFINF when doing text mining? Thanks

View 1 Replies View Related

Extract Text From Sqlserver Varbinary (office Document)

Dec 5, 2007

 Hi all,I've the following scenario: One Full Text Search enabled SQL Server Table with one image type field that holds document uploaded from users.The idea is to store binary document(.doc. xls, .pdf, .ppt, html, .xml and so on) and using SQL server full text search i can retrieve record that contains certaind word or words.I have no problems with them. So imagine i do a simple select * from Documents where a=b and i get one collumn with binary document field.With this scenario, i want to "extract" that text from that document + 20 words left and 20 right to show user some info and help him to search desired document (not only for its type or title). Like search engines do.But believe me, i cant find out any component, class or something to do such a thing.I think, the hard work is done with full text search engine...Sql server has that data, but it can decodeI'm so desperate. I would accept answers such "sorry, it can't be done", from a experienced user, but i need to know  Thanks in advance 

View 1 Replies View Related

SQL Server 2008 :: Pattern Matching And Extract Text

Sep 17, 2015

I have two tables in SQL Server--an expression table and a translate table.

DECLARE @EXPRTABLE TABLE
(
expression varchar(100)
)

INSERT INTO @EXPRTABLE
SELECT 'CALL("-","","TEST")'

[Code] ....

I am trying to (for lack of a better way to explain it), overlay the pattern onto the expression and extract the text where the "#" symbols are.

So,

CALL("-","","TEST") using pattern CALL("#","#","#") would return -,,TEST
SUB(2,67,TEST,4,) using pattern SUB(2,#,TEST,4,) would return 67

View 8 Replies View Related

Can We Extract Adjectives Using SQL Server 2005 Text Mining?

Jul 26, 2007

View 1 Replies View Related

T-SQL (SS2K8) :: Extract Quoted Text Elements From Varchar Column

Nov 18, 2014

I need to extract specific text elements from a varchar column. There are three keywords in any given string: "wfTask," "wfStatus" and "displayReportFromWorkflow." "wfTask" and "wfStatus" can appear multiple times, but always as a pair and will each be followed by by "==" (with or without surrounding spaces). "displayReportFromWorkflow" is always followed by "(" and there can be spaces on either side. The text elements will be between a pair of double quotes, and following one of keywords. For each row, I need to return the task, status and report name.

declare @t table (rowID int, textValue varchar(1024))
insert @t
(rowID, textValue)
values

[Code] ....

Output:
rowID, Task, Status, ReportName
----- --------- ------- ------------------------
1, Issuance, Issued, General Permit
2, Issuance, Issued, Capacity Letter Type III
2, Review, Denied, Capacity Letter Type III

I started with a string splitter using the double quote character, referencing elements "i" and "i+1" where the text like '%wfTask%' or '%wfStatus%' or '%displayReportFromWorkflow%', but the case of multiple task/status in a row has confounded me so far.

Unfortunately, CLR is not an option.

View 1 Replies View Related

Writing A DTXS Package To Extract 50 Tables To 50 Text Files?

Nov 26, 2007

Is there a quick way to extract a full dump of 50 tables to 50 corresponding text files?


i.e.

table_a has to be extracted to table_a.txt

table_b has to be extracted to table_b.txt

table_c has to be extracted to table_c.txt
etc.

I don't want to have to add each one separately by hand in the DTSX package designer.
I can't see any way to do it in a loop (because you have to do the field mapping).
I can't seem to get the DTS Wizard to help - it only seems to be able to handle one table-to-text extract at any one time.
And I've tried editing the DTXS file directly (in XML) but it looks like it's going to be rather complex, even if I only do it to define the connection managers.
Feel free to suggest any better way to do this, though the specification has already been agreed, so I'm unlikely to be able to change it.
Thanks

View 3 Replies View Related

Extract A Program From SQL 2000?

Jun 4, 2007

Hello,
We have a web based program that is using SQL 2000 as the db. Sql 2000 is running on a Windows 2003 server.

Is it possible to extract the SQL 2000 program(web based) with a clean db onto a blanket CD so another person can install it?

Any help would greatly be appreciated.

Mike

View 1 Replies View Related

DirectReports-- How To Extract This Active Directory Attribute Value In MS SQL 2000 Server

Nov 22, 2007

hi,
I am trying to run a query analyzer via query against ad. Below is the error I am getting. How to extract the directReports attribute values from windows 2003 active directory


SELECT * FROM OPENQUERY( ADSI,
'SELECT directReports FROM ''LDAP://192.168.1.24/dc=xxx,dc=com''
WHERE objectCategory = ''Person'' AND objectClass = ''user'' order by name')

Err: Server: Msg 7346, Level 16, State 2, Line 1
Could not get the data of the row from the OLE DB provider 'ADsDSOObject'. Could not convert the data value due
to reasons other than sign mismatch or overflow.

plz do the need full

thanks & regards
venkey

View 3 Replies View Related

Create Table From Text File, Extract Data, Create New Table From Extracted Data....

May 3, 2004

Hello all,

Please help....

I have a text file which needs to be created into a table (let's call it DataFile table). For now I'm just doing the manual DTS to import the txt into SQL server to create the table, which works. But here's my problem....

I need to extract data from DataFile table, here's my query:

select * from dbo.DataFile
where DF_SC_Case_Nbr not like '0000%';

Then I need to create a new table for the extracted data, let's call it ExtractedDataFile. But I don't know how to create a new table and insert the data I selected above into the new one.

Also, can the extraction and the creation of new table be done in just one stored procedure? or is there any other way of doing all this (including the importation of the text file)?

Any help would be highly appreciated.

Thanks in advance.

View 3 Replies View Related

How To Put Both Text And Image Into SQL 2000?

Aug 26, 2005

how to put both  text and image into SQL 2000?

View 1 Replies View Related

SQL 2000 And Free Text Search

Jul 10, 2006

I have created a stored procedure which should accepts a search friendly string to be used in a free text search. I am using
DSPerson AS FT_TBL INNER JOIN CONTAINSTABLE (DSPerson, [FiftyWords],        @FiftyWords       ,50    ) AS KEY_TBL    ON FT_TBL.PersonID = KEY_TBL.[KEY] WHERE FT_TBL.PersonID != @PersonID ORDER BY KEY_TBL.RANK DESC
Now the problem here is that the parameter @FiftyWords should be able to accept a string such as
'"Love" OR "Hate" OR "Customer Service"'
Notice the start and end of the query with single quotes and concepts should be between double quotes. Now this works OK inside SQL Query Analyzer, but try to get this right building such a string within ASP.NET and passing it as a parameter to SQL. In SQL profiler it comes out all weird with more quotes than originally built on asp side (errror obviously). Furthermore, I can't find an escape sequence that comes out right on the SQL side.
Any ideas of how to fix this??
 

View 4 Replies View Related

Update A Text Field In T-SQL 2000.. How ??

Feb 19, 2004

First i use openxml to get my data to update the other server with webservices.

my prob is that i cant update text Fields because i got an error

================
OLE DB provider 'OpenXML' reported an error. The provider did not give any information about the error.
OLE DB error trace [OLE/DB Provider 'OpenXML' IRowset::RestartPosition returned 0x80004005: The provider did not give any information about the error.].
================


what would be my best shot here...


thanx




=======================================
XEC sp_xml_preparedocument @handle OUTPUT, @data
begin transaction
SELECT * FROM TblEvenement WHERE idEvenement = 95

UPDATE TblEvenement SET
TblEvenement.idEvenement = isnull(iox.idEvenement,TblEvenement.idEvenement),
TblEvenement.sNomEvenement = isnull(iox.sNomEvenement,TblEvenement.sNomEvenement),
TblEvenement.sDescriptionCourte = isnull(iox.sDescriptionCourte,TblEvenement.sDescriptionCourte),
TblEvenement.sDescriptionLongue = isnull(iox.sDescriptionLongue,TblEvenement.sDescriptionLongue),
TblEvenement.IdTypeSalle = isnull(iox.IdTypeSalle,TblEvenement.IdTypeSalle),
/*TblEvenement.imgSalle = isnull(iox.imgSalle,TblEvenement.imgSalle),*/
TblEvenement.sNomArtiste = isnull(iox.sNomArtiste,TblEvenement.sNomArtiste),
TblEvenement.bAfficherInternet = isnull(iox.bAfficherInternet,TblEvenement.bAfficherInternet),
TblEvenement.nNbBilletLimite = isnull(iox.nNbBilletLimite,TblEvenement.nNbBilletLimite),
TblEvenement.bLivraisonCourrier = isnull(iox.bLivraisonCourrier,TblEvenement.bLivraisonCourrier),
TblEvenement.IdTypeRepresentation = isnull(iox.IdTypeRepresentation,TblEvenement.IdTypeRepresentation),
TblEvenement.sDetailInternet = isnull(iox.sDetailInternet,TblEvenement.sDetailInternet),
TblEvenement.bHistorique = isnull(iox.bHistorique,TblEvenement.bHistorique),
TblEvenement.bAdmissionGenerale = isnull(iox.bAdmissionGenerale,TblEvenement.bAdmissionGenerale),
TblEvenement.bEvenementEnVente = isnull(iox.bEvenementEnVente,TblEvenement.bEvenementEnVente),
TblEvenement.IdProducteur = isnull(iox.IdProducteur,TblEvenement.IdProducteur),
TblEvenement.bEvenementDemo = isnull(iox.bEvenementDemo,TblEvenement.bEvenementDemo),
/*TblEvenement.sLogoBOCA = isnull(iox.sLogoBOCA,TblEvenement.sLogoBOCA),*/
/*TblEvenement.sLogoLP2722 = isnull(iox.sLogoLP2722,TblEvenement.sLogoLP2722),*/
TblEvenement.sDescriptionCourte_En = isnull(iox.sDescriptionCourte_En,TblEvenement.sDescriptionCourte_En),
/*TblEvenement.sDescriptionLongue_En = isnull(iox.sDescriptionLongue_En,TblEvenement.sDescriptionLongue_En),*/
TblEvenement.sDetailInternet_En = isnull(iox.sDetailInternet_En,TblEvenement.sDetailInternet_En)
FROM OPENXML (@handle, N'//TblEvenement')
WITH
(
idEvenement int,
sNomEvenement nvarchar (100),
sDescriptionCourte nvarchar (100),
sDescriptionLongue text,
IdTypeSalle int,
imgSalle image,
sNomArtiste nvarchar (100),
bAfficherInternet bit,
nNbBilletLimite int,
bLivraisonCourrier bit,
IdTypeRepresentation int,
sDetailInternet nvarchar (100),
bHistorique bit,
bAdmissionGenerale bit,
bEvenementEnVente bit,
IdProducteur int,
bEvenementDemo bit,
sLogoBOCA text,
sLogoLP2722 text,
sDescriptionCourte_En nvarchar (100),
sDescriptionLongue_En text,
sDetailInternet_En nvarchar (100),
sNomEvenement_En nvarchar (100)
) iox

WHERE TblEvenement.idEvenement = iox.IdEvenement /*and WRITETEXT (TblEvenement.sDescriptionLongue @ptrval 'Salut')*/

SELECT * FROM TblEvenement WHERE idEvenement = 95
rollback
EXEC sp_xml_removedocument @handle

View 1 Replies View Related

SQL 2000 Full Text Search

Feb 21, 2001

This may be more of a site architecture question, but I wonder what mechanism large web sites with hundreds of thousands of products are using to build search functionality for their customers. I understand that the SQL 7 full text indexing was pretty poor, but with the full text search improvements in SQL 2k, it is now usable? Does it stand up under heavy simultaneous load? Does anyone out there use it? I know also that Index server can be used instead, but if anyone has any opinions on this, it would be greatly appreciated.

thanks!

View 1 Replies View Related

SQL 2000 - Large Text Values

Oct 10, 2007

Hi all,

I have an existing database, which is used to store complaints data and have one field, which stores notes in a varchar(8000) column.

My users are now wanting to store information, which exceed the number of available characters. What options do I have in facilitating this?

Many thanks

View 5 Replies View Related

Problems With Text Column In SQL SERVER 2000

Aug 4, 2005

Hi,I am trying to access the data inside a text column in the database and display it on a page.The problem is, I cannot see the full data when I execute the stored procedure in SQL Server and also on the asp.net page.it seems Sql server clips the data if it is more than 3000 characters. Is there anyway I can see the whole data that is stored in that particular column.I do not understand why asp.net is also clipping the data. What container can I use to display the text? I have tried Literal, string, placeholder but nothing shows the full text that is supposed to be in the database.I have seen some people using byte arrays but I am not sure how I can use them to display data on a page. If anyone has done this before or had a similar problem please reply back.Thanks.

View 7 Replies View Related

Loading Data Into SQL 2000 From Text Files

May 1, 2002

I have 6000+ text files, average size 400 kb, that I need to load into 1 table in Sql Server 2000. Does anyone know of an easy way to do this? I thought I would just write a little VB app to loop through all the files in the directory and insert the data into an existing table but there must be an easier way.

Any help would be appreciated.

View 1 Replies View Related

Full Text Search Possible For 2000 &&amp; 2005 On Same Pc

Apr 4, 2007

Hello:



I am on a development machine with sql 2000 & sql 2005 installed. The full Text Search for sql 2005 is installed and running on this local machine.



However, I need to do a full text search with sql 2000. When I do:

sp_fulltext_database 'enable'



I get:

Full-Text Search is not installed, or a full-text component cannot be loaded.



Can I install full text search for both sql server 2000 & 2005. I read somewhere that this is not possible.



Since fulltext search loads with sql 2005 (I believe), does this mean I can't do an sql server 2000 full text search on a local machine (or server) that has both of sql2000 & sql 2005 installed.



Thanks for any help on this

View 1 Replies View Related

Xml Text In Temporary Table To SP In MSSQL 2000

May 23, 2008

let's say I have this one, no problem:





Code Snippet
CREATE PROCEDURE au_info
@var text
AS
DECLARE @hDoc int
EXEC sp_xml_preparedocument @hDoc OUTPUT,
@var
PRINT CAST(@var as varchar(8000))
-- Use OPENXML to provide rowset consisting of customer data.
--INSERT Customers
SELECT *
FROM OPENXML(@hDoc, N'/ROOT/Customers')
-- WITH Customers
GO









Code Snippet
EXEC au_info @var = '
<ROOT>
<Customers CustomerID="XYZAA" ContactName="Joe"
CompanyName="Company1">
<Orders CustomerID="XYZAA"
OrderDate="2000-08-25T00:00:00"/>
<Orders CustomerID="XYZAA"
OrderDate="2000-10-03T00:00:00"/>
</Customers>
<Customers CustomerID="XYZBB" ContactName="Steve"
CompanyName="Company2">No Orders yet!
</Customers>
</ROOT>'







but what if I only have the xml text in a temporary table:



Code Snippet
create table #t1 (col1 text)
insert into #t1
Values('<ROOT>
<Customers CustomerID="XYZAA" ContactName="Joe"
CompanyName="Company1">
<Orders CustomerID="XYZAA"
OrderDate="2000-08-25T00:00:00"/>
<Orders CustomerID="XYZAA"
OrderDate="2000-10-03T00:00:00"/>
</Customers>
<Customers CustomerID="XYZBB" ContactName="Steve"
CompanyName="Company2">No Orders yet!
</Customers>
</ROOT>')





if i do this:



Code SnippetEXEC au_info @var = (Select col1 from #t1)





Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near '('.




Code SnippetEXEC au_info (Select col1 from #t1)




Server: Msg 201, Level 16, State 3, Procedure au_info, Line 0
Procedure 'au_info' expects parameter '@var', which was not supplied.


View 9 Replies View Related

Querying A TEXT Datatype Column In SQL Server 2000

Jan 17, 2008

HI,
I'm trying to implement a site search.  The only problem is that some of the pages have more than 8000 characters (like the press release pages) so I had to use the TEXT datatype (sql server 2000).  I wrote a simple stored procedure to query the column, however it does not return any results.  I'm assuming this is due to the fact that it is the TEXT datatype.  ANY help would be GREATLY appreciated.  Code below:
  CREATE PROCEDURE sp_SiteSearch
@keyword text

AS

SELECT PageText
FROM tbl_Pages
WHERE PageText LIKE '%@keyword%'
GO 

View 9 Replies View Related

In SQL 2000 In TEXT Data Type How Much Long Is The Limit?

Apr 18, 2005

Hai Every one
      i am facing a werid problem it is related to storing a long text data in SQL 2000 the text data is some thing like the following
"dshjfsjlksdjakdjlksadjfeidkadflkdsajfieawirfjalkdfjsakdfjaiekdvnmckaumnmmmmmmmmmmmmmmmoadifdjsakdjfauiereoweiiiiiiiiiiiiiiiiiiiiiiiiiiidalfkjdsa,mlfdsdflvmsaldifsdjfskladfakdfjakladkalfkfadkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkadlkfjaidfajfkamcmmmmmmmmmmmmmmmmmmmmmmmmmmmmmiadlmfalierfmaerjeaiaelelllllllllllllllllllll..."
in short it is really long so i opted to go with TEXT data type as it states that it can store more than 8 kb but when i try to insert this data it gives me error stating that Text data type cannot be of length more than 128...........?
What  am i doing wrong........if Text is not the proper datatype to store such a data then can anyone suggest some thing better...............
Thanks in advance
Austin

View 1 Replies View Related

How Can I Save Arabic Text Instead Of ???? To Sql Server 2000 Tables?

Dec 12, 2005

hi all
i have a database in sql server 2000
and vb.net forms
when i send arabic data through forms, they save to database as ??????
i had create my database with arabic collation and save my forms with unicode
but that problem exists
any help ?
imergency help is needed !
thank u

View 3 Replies View Related

Full Text Search On Clustered SQL Server 2000

Jun 21, 2005

I am using SQL Server Enterprise 2000 and have created a full text search on the pubs database as per the instructions below:-

http://www.databasejournal.com/features/mssql/article.php/3441981

However, when I verify the search :-

SELECT title, notes
FROM titles
WHERE CONTAINS (notes, ' "quick easy" ')

no rows are returned.

In the full text tab under the pubs database, my demo catalog is listed, but the Item count and unique key count are both 1. There are 18 records in my titles table.

The full text files location is on my H drive which is set up as a dependency of SQL Server in cluster admin.

In SQL EM->Support Services->Full Text Search->properties, the location of my temporary files was set to C:winnt empgthrsvc. As nothing in cluster admin can see this directory, I changed it to H: emp but still no data is returned by the query. There is no default error log file listed and I can't work out how to change this.

I have checked the Search service is running under the local system account.

I can't find any error messages which may indicate a problem apart from the fact that the T-SQL query doesn't return any data.

Anyone any ideas? Any help is much appreciated.

Thanks in anticipation.

Claire

View 3 Replies View Related

Help,a Regular Text File How To Sql 2000 Table Code ?

Apr 5, 2008

help,a regular text file how to sql 2000 table code ?i have a text file as follow, line with ¡°|¡±and {LF},8|-000000186075919.|+000000000387820.|2008-03-31|20010423|9|-000000000003919.|-000000000123620.|2008-03-31|20010123|8|-000000018623419.|+000000000381230.|2008-05-30|20010423|i want to sign char(1)£¬year decimal(18,3) , month decimal(18,3), trandatesmalldatetime£¬update smalldatetime£¬after to sql table is as follow,sign year month trandate update8 -186075919.000 387820.000 3/31/2008 4/23/20019 -3919.000 -123620.000 3/31/2008 1/1/20018 -18623419.000 387820.000 5/30/2008 4/23/2001could you help me how write the sql code ?

View 1 Replies View Related

Export Data To Text File From SQL Server 2000.

Mar 31, 2008



Hi,

Can anyone please help me on how to export data from SQL server 2000 to text file using C#. I could use bcp command to directly import data, but there are some changes need to be made to some codes from other tables in database and the data to be downloaded is also very huge. probably 10 million records.

View 4 Replies View Related

Error While Importing Text File Into Sql Server 2000

Mar 29, 2007

hi all,

While importing into sql server 2000 from a text file i am getting an error message like not enough disk space available to perform this operation but there is enough space (around 18gb). Please advice why this is happenning as my work is stuck



thanks and regards

jk

View 4 Replies View Related

How To Insert The Value From The Text Box (ASP.NET 2.0) To The Microsoft Sql Server 2000 Database - Dynamically.

Nov 16, 2006

Hello Friends,

I have a problem with ASP.net with dynamic data transfer from asp page to microsoft sql server 2000. For example , I have asp

web page with one text field and a buttion.

When I click the buttion, the value entered in the text field should be transfered from the text field to database. 



Kindly See the following section c# code .....



SqlConnection objconnect = new SqlConnection(connectionString);

SqlCommand cmd = new SqlCommand();
cmd.Connection = objconnect;
cmd.CommandText = " select * from Table_Age where Age = @Age";
cmd.CommandType = CommandType.Text;

SqlParameter parameter = new SqlParameter();
parameter.ParameterName = "@Age";
parameter.SqlDbType = SqlDbType.VarChar;
parameter.Direction = ParameterDirection.Output;
parameter.Value = TextBox1.Text;

objconnect.Open(); // Add the parameter to the Parameters collection.
cmd.Parameters.Add(parameter);
SqlDataReader reader = cmd.ExecuteReader();

********************this section c# code is entered under the button control************************************

connection string is mentioned in the web.config file.

In the above c# code , I have a text field , where I entered the age , the value entered in the text field should be sent to

database. I have used SqlParameter for selecting the type of data should be sent from ASP.NET 2.0 to the microsoft sql server 2000. I am facing a problem

where I am unable to sent the random datas from a text field to the database server.


I have a created a database file in the microsoft server 2000.after the excution of the fIeld  value is assinged to NULL in the main database i.e microsoft the sql server 2000.Can anyone help with this issue.My mail id phijop@hotmail.com- PHIJO MATHEW PHILIP.     

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved