Write Out Results Of Command Object
I am trying to write out the results to the screen and save them to disk, but I can't figure out how to properly formulate the code.
I keep getting this error: Object doesn't support this property or method
Code:
View Replies
ADVERTISEMENT
I am getting the above error when trying to execute the following code:
View Replies
View Related
I have an online application. I get the following error when a user selects an option from one drop down list but doesn't select an option from another drop down list. Here is the error:
Microsoft OLE DB Provider for SQL Server error '80040e0c' Command Text was not set for the command object. Code:
View Replies
View Related
I have an online application. I get the following error when a user selects an option from one drop down list but doesn't select an option from another drop down list. Here is the error:
Microsoft OLE DB Provider for SQL Server error '80040e0c'
Command Text was not set for the command object.
Line 87
Line 87 = rs1 = conn.execute(finalSQL)
Here is the page causing the error. Code:
View Replies
View Related
I keep getting this error. I searched the forums, and found one. It said to basically replace elseif with else. It worked for that person.
I tried it and it didn't work. So what i decided to do was, remove all of the if statements and keep one. Even with just one if statement i get the same problem. Does anybody know what is wrong? It worked fine, up until i added the if statement. I need them there though for a reason.
Personally i think, it;s not getting the value from the request form, and hense it isn't picking anything up. What do you lot reckon? Code:
View Replies
View Related
I want to open a recordset object on an .asp page. When I open the recordset I would like to use a stored procedure that expects a parameter to be passed for the stored procedure. I will then use the recordset to loop thru the recordset, update values from the recordset and then update the database by passing parmeters to another stored procedure.
I would like to use the recordset object but can it be used to pass a parameter to a stored procedure? Do I need to use a command object to open the records instead in
order to pass the parameter to a stored procedure?
View Replies
View Related
I have a record set that I can successfully write out to an asp page.
My manager would like the reports to have alternate row colors for the
report tables (i.e. rows 1, 3, 5, 7, 9, etc have white background and
rows 2, 4, 6, 8, 10, etc have a green background). Any ideas on how to
do it? I am sure it has to do with the *tr* tag, but not quite sure how
to work it.
View Replies
View Related
i build my sql string by using bunch of if-end if statements, after storing the whole SQL string into variable strSQL i put into the command object's CommandText property like so:
objCommand.CommandText = strSQL
Set rsRec = objCommand.Execute 'rsRec being a recordset
then i want to be able to display the data:
While Not rsRec.EOF
Response.Write(rsRec("FIRST_NAME") & " " & rsRec("LAST_NAME") & " - " & rsRec("FIRM_NAME") & _
" " & rsRec("EMAIL") & " " & rsRec("CITY") & "<BR>")
rsRec.MoveNext
Wend
but this gives me an error saying:
Object doesn't support this property or method: 'CommandText'
View Replies
View Related
i keep on getting it for some reason. i am using asp Command text was not set for the command object.
View Replies
View Related
I have a recordset object generated by the command object
as in recordset object=command.execute
now recordset.recordcount gives me -1 !!!!
the actual record count is 7!!!
Any body who can tell em how to change the cursor type of the recordset
which is generated by a command object!!!
View Replies
View Related
i m retriving values from SQL Server 7 using command object through a query
Statement in bold format is giving an error in execution : Code:
View Replies
View Related
Microsoft advises not to pass parameters to the Command object in the Execute statement. Why?
View Replies
View Related
I am trying to close a command object after executing a command text and getting an error message as:
Microsoft VBScript runtime error '800a01b6'
Object doesn't support this property or method: 'close' /data_usage_guide/workplansystem/ProjDataLoad.asp, line 67
The reason I want to close the object is to use it again for executing another commnad text as shown in the code below. Could any oen help why I am getting this error message and/or is there a better way to do this , i.e. posting data to several diferent tables one after the other. Code:
View Replies
View Related
I have an asp page that gives results for a search from a previous page from streetguide.streets in MySql. The page displays the UserName of the person logged in.
I have the results of this query displayed inside a form with hidden variables. When the user clicks "save to my folder" I want it to create a table in the mysql db with the same name as the user name, and then write to this table.
I have it working if I created the table beforehand, but I want the table to be created dynamically upon form submission with the table name to match the persons user name.
View Replies
View Related
Have no problem getting my select queries to work using this method:
strSQL = "SELECT tblUI.IPAdd FROM tblUI WHERE (tblUI.IPAdd =?)"
arSPrm = Array(strRemHst)
Set rst = cmd.Execute(,arSPrm)
Can anyone point me to some examples of using this method for UPDATE and
INSERT queries? Can't seem to get it to work no matter what I can think of
to try. (If it is possible?)
View Replies
View Related
i'm using command object like this:
objCommand.CommandText = strSQL
strSQL being a SELECT string.
then executing it:
Set rsRec = objCommand.Execute
how can i get total number of records found, changing the line above to this:
Set rsRec = objCommand.Execute totRec
gives me an error and doing just this:
totRec = rsRec.RecordCount ....outputs -1
View Replies
View Related
I am writing a VBS File Which will Take Data from an SQL Database and put it into a text file. I am getting an error on: myFile.Write NewLine (myFile is set to FSO.CreateTextFile, and NewLine is the text I am trying to write)
I have found this error is being produced When I try to "write" this text from the database:
<p><b>Movin’ On Printed Throw Blanket</b></p><p>
The Problem is on this "Square" Charecter. I used the Asc() Function and got the Charecter value as 63, and Did a replace on it and it still does not work. I don't know how this charecter got in the database in the first place. I don't know if that charecter will show up correctly on this forum. But the character just looks like an empty box.
View Replies
View Related
In Windows 2000 I need permissions set so that I can write a text file to the folder when the asp page is loaded. Right now I have only these permissions set:
Administrator: Full
System: Full
Everyone: Read and Execute, List, Read
Network: Read and Execute. List. Read
Is there some other "user" that I can give permissions to to write a text file to the folder that doesn't allow write permissions to IUSER_MachineName?
View Replies
View Related
I am getting the above error in an asp page. Not sure why? The error details is given below. Code:
View Replies
View Related
I'll admit my ASP skills are very rusty, and come seeking help.
I'm currently using a dictionary object to store a multi-dimensional array.
I want to pass this dictionary object to an object, which holds an array of dictionary objects.
However I'm finding that the array is not getting set, thus I'm having great issue with dynamically resizing the object's property for every new dictionary object I'm adding.
View Replies
View Related
I have a VC++ COM object which fires an event. I've written VB EXE apps against it and they receive the event notification.
I've now built a simple VB COM object which uses the VC++ COM object internally.
My question is, assuming the ASP page which loads the object does not immediately exit, will the VB COM object be able to receive the events from the internal object?
View Replies
View Related
We are using .net 1.1 on windows 2003 server. This is we are facing in our
production server.
When we are doing the load testing we are getting the bellow error. While
the load testing this error is not coming frequently. When we run 20 threads
for 3 mins we are getting this error message 2 or 3 times. But this line of
code is executed by all the threads. Code:
View Replies
View Related
I have a form that uses the POST method to call up test.asp and it
passes what is typed into the text box. Since is uses the Like command
the user can enter stuff like %Constant% to get something that is like
what the user typed in. When I call up the test.asp page it is grabbing
the text fine but isn't running the SQL command the correct way. The
SQL command ends up being:
SELECT * FROM [Everyone] WHERE (Name LIKE ':: & strName & ::')
Here is my code
strName = Request.Form("Search")
Set Conn = Server.CreateObject("ADODB.Connection")
Set Rs = Server.CreateObject("ADODB.RecordSet")
Conn.Open "PhoneList"
sSQL = "SELECT * FROM [Everyone] WHERE (Name LIKE ':: & strName & ::')"
Set Rs = Conn.Execute(sSQL)
View Replies
View Related
Given a class called Foo, I can do:
Set f = New Foo
But is there a way to instantiate a class and pass a parameter into it as well, such as:
Set f = New Foo("joe")
If so, then how does class Foo look like to accept such a parameter?
View Replies
View Related
How can I run a CLI command from asp page?
Please guide me.I have hard coded the variables. I need drections and see if my method is right.
Dim shell
Set shell = CreateObject("WScript.Shell")
shell.Run((im editissue --field= "state = verified" --field = "user = abc" 15947)
Set shell = Nothing
View Replies
View Related
does any body have a command that enables you to talk to another computer on a network
like A instant message.
View Replies
View Related
How can I run a DOS command from my ASP ?(prefer to use html/vbscript solution rather than 3rd party add-ons)
View Replies
View Related
I am using DW to create this ASP page and I need to do a simple calculation that will result in a cell being 10% of the previous cell. I am using this statement:
<%=(rsReferingAgent.Fields.Item("ReferingAmount").Value * .1)%>
Now, all I need to know is how to get it to only display two decimal places instead of multiple decimal places.I need the result to look like this:
$1,234.45
and not:
1234.4573
View Replies
View Related
I would like to use the sql command to query the database from ASP. But it keep showing me the error. Select location from the table tapeinfo. The location must start with "Data". Here is the command?
'sqlStrl="SELECT * FROM tapeinfo WHERE location like ' "&Data&"% ' "
Anyone can help me to verify whether it is correct?
View Replies
View Related
I have a form that uses the POST method to call up test.asp and it passes what is typed into the text box. Since is uses the Like command the user can enter stuff like %Constant% to get something that is like what the user typed in. When I call up the test.asp page it is grabbing the text fine but isn't running the SQL command the correct way. The SQL command ends up being
SELECT * FROM [Everyone] WHERE (Name LIKE ':: & strName & ::')
Here is my code
strName = Request.Form("Search")
Set Conn = Server.CreateObject("ADODB.Connection")
Set Rs = Server.CreateObject("ADODB.RecordSet")
Conn.Open "PhoneList"
sSQL = "SELECT * FROM [Everyone] WHERE (Name LIKE ':: & strName & ::')"
Set Rs = Conn.Execute(sSQL)
View Replies
View Related
I have the following code in a function: Code:
dim weight, cubic, length
weight = request.form("25k")
cubic = request.form("4CF")
length = request.form("2m")
Some of these could be null but what i need to do is caputre the highest number and place that in a database. I assume i can use the max command but a bit unsure how to do it.
View Replies
View Related
I am having trouble trying to figure out how to properly enter a checkbox in the SET statement so I can update the checkbox value based on user's input.
I know for number values you enter the variable like this:
Code:
Owner = own
and for text you enter like this:
Code:
Priority = 'pri'
and for dates you enter the variable like this:
Code:
tdate = #td#
but how do you create the variable in the SQL statement so it updates a checkbox value?
Below is my SQL statement, and the checkbox name is "Active" Code:
View Replies
View Related
I am using the below command to restart a service on one of my web
boxes, this runs fine from the command prompt and also through a *.bat
file.
"Server1Applist$BOBJCentralMSpsservice.exe" Server2 -u
eutee-ww02pUsername -p password restart BOBJCentralMS
I found this asp code in this forum but can not get it to work with my
command
<%
Dim oShell, sCommand
sCommand = "MyCommand"
Set oShell = CreateObject("WScript.Shell")
oShell.Run sCommand, , True
Set oShell = Nothing
%>
I replace "MYCommand" with the command i wish to execute but the page
just hangs with the blue status bar halfway complete at the bottom,
when checking the services on the box it is not restarted.
View Replies
View Related