how to pass a database column value to a string
url = ojRS(LastUsedKe yValue)
Response.Write( "<td><A Class=TabLink HREF = 'http://"" url ""/csipts/login.asp?Key=" & SecEncode(iId) &" &scserver=CP ' > " &SecEncode(i Id) &" </a> </td>")
HREF = 'http://"" url ""/csipts/login.asp?Key=" &...
User Profile
Collapse
-
how to pass a database column value to a string
[code=asp]dim url,ojRS, SQL_Input
set ojRS = Server.CreateOb ject("ADODB.Com mand")
Set ojRS.ActiveConn ection = C
SQL_Input ="CP.dbo.usp_cs _Links"
ojRS.CommandTyp e = adCmdStoredProc
set ojRS = C.Execute(SQL_I nput,,adCmdText )
url = ojRS(LastKeyVal ue)
Response.Write( "<tr>")
Response.Write( "<td Class=Field>... -
How to write using ADODB RecordSet
Hi
.Actually I want to count the number of records in a recordset. So I m using the ADODB.Recordset . I just want some one to correct me.
Set Cmd = Server.CreateOb ject("ADODB.Rec ordset")
Cmd.ActiveConne ction = C
Cmd.CommandText = "CP.dbo.spBCode "
Cmd.CommandType = adCmdStoredProc
cmd.Parameters. Append cmd.CreateParam eter("@Bcode", adVarChar, adParamInput,... -
The output if i write the response.write( ExportSql)
cp.dbo.sp_Code@ BCode=NULL ,@F_Ind =NULL ,@S_Ind=NULL ,@HIPC=NULL ,@Active =NULL ,@ACF=NULL ,@BaseInd =NULL ,@MHN=NULL ,@SHEVHO=NULL
what should be the possible error ???????
plus another thing i have noticed is after
rs.open ExportSql, c,adOpenStatic, adLockReadOnly, adCmdTxt
this stmt i m gettin the Application Error. i should actually...Leave a comment:
-
I am still getttin the same Error on Page nad the same above errror in the errorlog file,
ExportSql = "cp.dbo.spCode" _
& "@BCode=" & dbQuoteOrNull(s BCode) & " ,"_
& "@F_Ind =" & dbQuoteOrNull(b F_Ind) & " ," _
& "@S_Ind=" & dbQuoteOrNull(b S_Ind)& " ," _
& "@Active ="...Leave a comment:
-
Regarding an error
I m getting an error in this line
rs.open ExportSql, c,adOpenStatic, adLockReadOnly, adCmdTxt
any problme with this . can any one help me out ,
the error is
LogTime = 11/6/2007 9:19:26 AM
ASPCode =
ASPDescription =
Category = Microsoft OLE DB Provider for SQL Server
Column = -1
Description = Line 1: Incorrect syntax near '='.
File = /scripts/san/table/try.asp... -
Actually i used it like this now
Response.Write( "<td><A Class=TableLink HREF = 'http://cs-dev.govt.com/csscripts/login.asp?K="& SecEncode(Id) &" &srcserver=C S' > " &SecEncode(I d) &" </a> </td>")
.........
it works . but sme how i want this also
onMouseOver="wi ndow.status='Ca se';return true" onMouseOut="win dow.status='';r eturn...Leave a comment:
-
-
i m gettin the same out put.i m not gettin the hyperlink !!!!!!!!!...Leave a comment:
-
Regarding the quotes in a hyperlink in ASP
Hi I just want to write a hyperlink in ASP. getting many errors . can anyone please help me with this....
Response.Write( "<font size=2 face=arial><A Class=TableLink HREF="http://cs-dev.govt.com/csscripts/login.asp?K=1234&srcserv er=cs" & "onMouseOve r=" & """" & "window.status= 'Case';return true" & """" & "onMouseOut ="... -
yea thts wht i did but i m gettin an error as Operation is not allowed when the object is closed.
so i used On error REsume next and it worked fine. but is there a problem if u have tht(On error resume next ) in the code......but the output is wht i wnated ?
Thanks in advance
thats all what you ahve to do...Leave a comment:
-
On error Resume Next
does On error resume next vreate any problem if its there in the code. Actually with this i m gettin the proper output other wise i get
the error
Operation is not allowed when the object is closed.
so is it ok ?
thanks in advance .will this be a problem for other webpages . cos many other pages also linked to this page , i checked there no problem now. but just wanted to be sure .
... -
Write and if statement
Hi all
i got the part of this code i have written
[code=asp]
Set CmdApp = Server.CreateOb ject("ADODB.Com mand")
CmdApp.ActiveCo nnection = c
CmdApp.CommandT ext = "sp_ Attachment"
CmdApp.CommandT ype = adCmdStoredProc
Set Param =CmdApp.CreateP arameter("@Id", adInteger,adPar amInput,4,Id)
CmdApp.Paramete rs.Append Param
set RS=CmdApp.Execu te...Last edited by jhardman; Oct 25 '07, 07:08 PM. Reason: put code in code tags. Please note button marked - # -
not to call the stored procedure in the code
Hi all,
in this part of the code it is if the iId <>0
now i have a difficulty .
if iId = 0
i should not call this stored proc ....how to carry on with this ...how is the else part written ...can you help me out
If iId <> 0 Then
If iStatusID = 1 Then
bLinkFlag = True
Else
'Set Rs = C.Execute("C.db o.usp_Misc @Opt=7, @Num = '" & v_Num & "'",... -
To update in a stored procedure
Hi ,
i just want to know if I am in the Right track .can you please check
Can you tell me if you want to update in a stored produre a column name i.e studentname.... nd make it flexible if the the column name is not given smetimes..
we must declare
declare
@studentname varchar(100) = null
-------
-------
-------
Update Engineer Set Id = @mechId, StatusId = 1,studentname... -
-
Instead of , the word comma is gettin displayed
hi all,
I have a Webpage where i need to add the some information about a material. the material is ROLLER , THREADS .now when i select it , it gets displayed as ROLLERComma THREADS ...I am not understanding why is it getting displayed this way .
Can anyone please help
Thanks in advance
In the code it is
Response.Write( "<TD VALIGN=TOP CLASS='tablebod ycopy' ALIGN=left>"&... -
Thanks to u . So I am gettint he date as I wanted ....now i have declare the
declare @startdate datetime
Set @startdate =' SELECT +''01/01/'' + CONVERT(VARCHAR (10), YEAR(GETDATE()) - 1)'
but now there is an error because of the mismatch datetime and Varchar ,
hence i used again
set convert (varchar(10),@s tartdate ,101) = ' SELECT +''01/01/'' + CONVERT(VARCHAR (10), YEAR(GETDATE())...Leave a comment:
-
plus i m gettin the error as
Syntax error converting the varchar value '01/01/' to a column of data type int....Leave a comment:
-
Thanks a lot for your help but this doesnt work .......like if todays date is 10/09/2007
i want to giv a default date as 01/01/ currentdate -1 ......so tht i get 01/01/2006...Similarl y if the current date is 01/01/2008 then also i want 01/01/2007
thnaks in advance...Leave a comment:
No activity results to display
Show More
Leave a comment: