| Author |
Topic |
|
krishnamangamuri
Starting Member
5 Posts |
Posted - 2006-04-17 : 09:45:06
|
| Hai Friends...I am using sql server 2000. i have one table with columnsempid notnullempfname not nullempmname nullemplname not nullwhile i am writing a simple procedure to get the employee middel name(empmname) it is giving the error message like thisServer: Msg 7105, Level 22, State 6, Procedure emp_statistics, Line 11Page (1:70), slot 18 for text, ntext, or image node does not exist.Connection Brokenplase help me UrgentThanks and RegardsKrishna Mangamuri |
|
|
Srinika
Master Smack Fu Yak Hacker
1378 Posts |
Posted - 2006-04-17 : 10:12:24
|
| Post ur "Simple Procedure"and how do u call itSrinika |
 |
|
|
krishnamangamuri
Starting Member
5 Posts |
Posted - 2006-04-17 : 10:35:24
|
| hai,the procedure iscreate proc loan_statistics @empid int,@compid int,@eid int out,@empmname varchar(100) out,select @eid=emp_id,@empmname=emp_mname from emp_master where emp_id=@empid and comp_id=@compidGOi am calling it asloan_statistics 1,255271111,0,''1-employee number255271111 - department number |
 |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2006-04-17 : 10:46:02
|
| you can skip the variables, keep it simple...create proc loan_statistics@empid int,@compid intasselect emp_id,emp_mname from emp_master where emp_id=@empid and comp_id=@compidGO--------------------keeping it simple... |
 |
|
|
Srinika
Master Smack Fu Yak Hacker
1378 Posts |
Posted - 2006-04-17 : 11:08:24
|
| krishnamangamuri,What is ur front end ? Do u get this message even when u r running this in Query Analyzer ?Ur concern is Connection Failure ?U have an extra comma in the parameters list.Also suggestion of jen is useful to "keep it simple"Srinika |
 |
|
|
krishnamangamuri
Starting Member
5 Posts |
Posted - 2006-04-18 : 07:45:30
|
| Haimy front end is JSP, if i did not use the parameters then it working fineif i use the CREATE proc testproc@empid int,@compid int,@eid int out,@empmname varchar outasselect @eid=emp_id,@empmname=emp_mname from emp_master where emp_id=@empid and comp_id=@compidGOit is giving this errorServer: Msg 7105, Level 22, State 6, Procedure testproc, Line 6Page (1:70), slot 18 for text, ntext, or image node does not exist.Connection Brokenempmname is NULL Field in the databasepls help meThanks & RegradsKrishna Mangamuri |
 |
|
|
chiragkhabaria
Master Smack Fu Yak Hacker
1907 Posts |
Posted - 2006-04-18 : 07:49:20
|
| Are you sure this code will return only one value?? Just try this .. select @eid=Isnull(emp_id,''),@empmname=IsNull(emp_mname,'') from emp_master where emp_id=@empid and comp_id=@compidIf Debugging is the process of removing Bugs then i Guess programming should be process of Adding them. |
 |
|
|
krishnamangamuri
Starting Member
5 Posts |
Posted - 2006-04-18 : 08:02:07
|
| Hai,its also not workingi am giving the table details firstempno empfname empmname emplname1 abc abc2 abc abc abc if i am using to get the empmname of the empid 1 then it giving the error.I Hope now my requirement is Clearly understood to AllThanks and RegardsKrishna Mangamuri |
 |
|
|
krishnamangamuri
Starting Member
5 Posts |
Posted - 2006-04-20 : 05:49:38
|
| Hai Friends,,still i have not resolved the problem of connection broking..one doubt ??if there a null filed in db while using select query with distinct Its also giving the same errorPlease Help meIts very UrgentThanksKrishna Mangamuri |
 |
|
|
|