Ad revenu
Looking for good Ad companies...
I currently have 2 on this site
www.spellarama.com/search.asp
Payout is about 0.01 for 20 page views + 70% on ad clicks base on bids...
Ad code is at the bottom of the page... Tag: Upload file Tag: 301671
ASP / SQLServer connection
Hi, I'm having trouble connecting to SQLServer in my ASP program.
here's the code
<%
dim objConnection, ObjRecorSet, strConnection, strOut, objCmd, objParameters
Set objConnection = Server.CreateObject ("ADODB.Connection")
strConnection = "DSN=SQL_Tracker;Database=Tracker;UID=sa;PWD=;"
objConnection.Open strConnection
...
%>
I'm getting this error on the line that opens the connection.
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user
'HOME\IUSR_HOME'.
/Tracker/list_team.asp, line 11
Notes:
I've set up the DSN called 'SQL_Tracker' in my ODBC settings.
When I use the Test Connection button it's successful.
The SQL Server is running on my own computer, and so I have
full DBA rights on it
any ideas what's wrong? Tag: Upload file Tag: 301660
401 unauthorized exception
Hi,
I am trying to convert a word document to pdf file from java for
this, I am using a asp file to convert doc file to pdf. I got it
working when I put the url which has file name as the query string in
the browser but when I call that asp file through the java application
I am getting 401 unauthorized xxx exception.
I am using weblogic 7 as the app server and IIS as the web server and
Adobe acrobat 6 which has pdf distiller in it. The problem is when the
asp file tries to create the
Server.createObject(pdfdistiller.pdfdistiller.1), since it is a third
party component, the machine doesnt allow me to create the object, I
guess I am not sure, but I got it working when I put the virtual
folder security anonymous user as domain admin but if i give any other
user name it is giving the exception 401 unauthorized exception. Is
there any other way I can give someother user name
Thanks In Advance,
Jayakumar. Tag: Upload file Tag: 301657
DHTML object model parsing under ASP
Dear Sir/Madam,
I'm about to start a project, the idea is to have a web interface to let
user specify the URL of a target HTML document,
based on that URL, retrieved and parsed the HTML document using the DHTML
object model exposed by ActiveX
control WebBrowser, getting the position and dimension of each node inside
the HTML document, processed it and pass
the result back to the user as a new HTML document.
I understand by using webBrowser control, it will means load of works for
server and is not recommended, but I couldn't
find any other solution that could get the DHTML object model, specifically
those dimension info for nodes, eg: *.clientWidth,
*.clientHeight, *.offsetheight, etc. or perhaps there are better ways?
Thank you for all your time reading this
Sincerely,
Egg Tag: Upload file Tag: 301656
Session cleaning problem
At a summary page, I am trying to clean up Session.Contents so the user can
go back to the main page and not retain any unnecessary info.
I have entered this into my summary page, but it seems to only eliminate
every other or every third entry. If I refresh the page about 0 times
everything eventually clears out. Anyone know why it would do this?
I don't want to use Session.Abandon because there are a few Session.Contents
I want to retain, like usernams and passwords.
<%
----snip----
For Each objItem in Session.Contents
Session.Contents.Remove objItem
Next
----snip----
%>
Session.Contents are being added like this:
<%
----snip----
Session("uName") = uName 'put info into a session variable
Session("uEmail") = uEmail 'put info into a session variable
Session("uPass") = uPass 'put info into a session variable
Session("uDomain") = uDomain 'put info into a session variable
----snip----
%>
Thanks
--
__o
_-\<,
(_)/(_)____ Tag: Upload file Tag: 301654
protecting non-asp files
Hi all,
Can anybody let me know how to protect pdf files from being accessed after the session has ended.(by typing the url).
If u could point to some code examples, that would be great.
Thanks,
kitty
-----------------------------
This message is posted by http://asp.forumszone.com Tag: Upload file Tag: 301648
Type Mismatch Error(numeric values)
i have 3 columns in sql server ..
all of them are numeric value
when a user enter my site i take the value of userid (numeric one) i assign
it as session("userid ")
after a query i take 2 value (both numeric again) from my table and write
this code
if towhom=session("userid") then towhom=fromwhom
it gives an error .. how can i solve it
Type Mismatch Error Tag: Upload file Tag: 301633
Connection Problem
Hi all
I've made a local copy of a client website (Pages and DB). I'm running XP
Pro and SQL 2000
They make use of global.asa to establish the connection and the details on
the live site were as follows:
<SCRIPT LANGUAGE="VBScript" RUNAT="Server">
Sub Application_OnStart
Application("connStr") = "Provider=sqloledb;" & _
"Data Source=SERVERIP" & _
"Initial Catalog=databasename;" & _
"User Id=username;" & _
"Password=password"
End Sub
</SCRIPT>
I put my local DB Server in Data Source and my local copy can be accessed
using a DSN. However, when trying to run the website I get the following
error:
Error Type:
Microsoft OLE DB Provider for SQL Server (0x80004005)
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access
denied.
/churchillmurray.co.za/include/commonFunctions.asp, line 25
That line of code where the error occurs looks as follows:
objConn.Open Application("connStr")
The site is in a virtual directory in IIS
Can anyone help me in making the connection? Tag: Upload file Tag: 301622
Drop Down Default Selected
I am creating an online survey for one of our grants and one of the items to
be answered is county (U.S.). The county is to be in a drop-down menu to
prevent typos and counties from other states by mistake. I'm doing
server-side validation (many of our users have disabled JavaScript) and need
to retain the user's selection if they need to revisit the page to make
corrections.
In the past I'd declare variables for each choice in the drop-down menu
(usually they are no more than five or six choices for what I've done) and
use a select case to set one of the variables to ' SELECTED'. However, in
the county list there are 86 choices.
What would be the most efficient way to retain the users selection if they
need to go back to fix errors? I also am looking for a similar solution for
many checkboxes.
Thanks,
--
JayB Tag: Upload file Tag: 301618
The call to Server.CreateObject failed while checking permissions. Access is denied to this object.
I've built an application in VB6 does some processing - it's not really
important what it does...
The application consists of a single DLL which does all the hard work, and a
simple EXE which acts as the front-end.
I designed it this way in the hope that I could also build an intranet app
that controls the same component (DLL).
I'm building the intranet page now, but I get this error when I try to
instantiate the component. Rather than fiddle aimlessly with the
permissions, I thought I'd post here and find out what I am missing.
What permissions do I need to set up and where?
Thanks Tag: Upload file Tag: 301615
Syntax Error on SQL statement
I am getting a syntax error on my SQL statement, not sure if I am doing this
right. i am trying to pass a value from another form.
strsql = "select PrinterModel, PrinterName, IP_Address, Location from
Printers where PrinterName = ' & <% =Request.Form(npName) %> & ')" Tag: Upload file Tag: 301614
Regular Expressions to find URL's in text
I am working on an ASP page that parses text using the VBScript.RegExp
regular expression object. My reg expression right now is as follows:
[a-z]+\.[a-z]+\.[a-z]+/
And if find URL's no problem like: windowsupdate.microsoft.com,
www.cnn.com, etc.
But I need to also find any URL, like these:
www.amazon.com/books/atoz/index.html
OR
msdn.microsoft.com/newsgroups/default.aspx
Some URL with a deeper path than something.something.com if that makes
sense. Any ideas? Tag: Upload file Tag: 301603
Regular Expression for URL
I am working on an ASP page which looks in a set of text for web page URLs.
Using the VBScript.RegExp regular expression object, I have this regular
expression:
[a-z]+\.[a-z]+\.[a-z]+/
And it works well finding URL's such as: windowsupdate.microsoft.com,
www.cnn.com, etc.
However, I have been trying to modify it to ALSO find URL's like this:
www.amazon.com/index/sell/ie6.html?val=1
Or
www.microsoft.com/windowsxp
Any ideas? Tag: Upload file Tag: 301602
ErrorPage from ErrHandler
I'm designing a 3-tier web application in .NET. In the
middle tier I have an error handler. I use Try-Catch
where I feel it's necessary. If I get a critical error I
would like to redirect to a "Critical Error page"
directly from the error handler without going up to the
UI tier. Is that possible and in that case how does the
code look?
Eje Tag: Upload file Tag: 301600
Crystal Report Login Problems in ASP
Hi! I try to preview a crystal report using asp,
it prompt 'CRAXDRT error Occured on server. -2147189176 : logi
failed'
Details : IM002 :[Microsoft][ODBC Driver Manager] Data sourcename no
found and no
default driver specified'.
This is wat I done in the Internet Server.
1. Install Crystal Report in Server.
2. Add new ODBC - User DSN.
3. Sharing report folder in IIS with 'Read'
and 'Directory Browsing'.
I use below syntax,
For Each mnTable in mainReportTableCollection
With mnTable.ConnectionProperties
Item("user ID") = "username"
Item("Password") = "password"
Item("DSN") = "dsnname"
Item("Server") = "Servername"
Item("Database") = "databasename"
End With
after only setting connection properties through the Table Collection?
-
jeremylim200
-----------------------------------------------------------------------
Posted via http://www.codecomments.co
----------------------------------------------------------------------- Tag: Upload file Tag: 301598
Do Events
Is there a command within ASP similar to the Do Events command in VB6. The
problem I have is that an asp page that I have written outputs many lines
after extracting data from WMI. In total there are about 1000 lines
generated which are displayed within the browser and saved to a database.
The browser displays the correct results and they are saved into the
database. But the browser only displays the results after it has completed
the entire script. Is it possible to get it to output lines before
continuing with the rest of the script so I can display a section at a time.
Paul Tag: Upload file Tag: 301590
problem with urlencode and ampersand
Server.UrlEncode is not longer converting the ampersand in a string to
%26 so the value passed in the querystring gets truncated in the
following page. Is this a problem with IIS, does anyone know? I can't
find this reported anywhere else. I may just have to code around it.
Details:
link is created by the following code:
<a>href="GroupDetails.asp?groupName=<%=Server.URLEncode(objRecordset("Group_Name"))%>">Group
Details</a>
If Group_Name contains an ampersand, this appears as & in the
querystring instead of being converted by URLEncode to %26. When the
groupName querystring value is used in the new page, it is truncated.
So "A & M AllStars" is truncated to "A".
However, this only occurs in 1 environment, in our dev environment it
works fine and converts ampersand so it doesn't muck up the
querystring. I can't find any obvious setting in IIS which would
affect this, but presumably it must be happening on the server and is
nothing to do with browser, browser version etc. I assume a security
patch has caused this. Any help would be appreciated. Tag: Upload file Tag: 301589
ASP and Access SQL Problem
I am attempting to insert data into an Access 2k database with the
following in an asp page:
strSQL="INSERT INTO EmpIncentive(Purple, " & _
"Red, Orange, Yellow, Green, Blue, Clndr) " & _
"VALUES('" & rEmployee & "', '" & rdffclt & "', '" & rrspnsetm & "', '"
& rcrrctd & "', '" & rcstmrsrvc & "', '" & rcmmnts & "', '" & rclndr &
"')"
Dim objRS
Set objRS=Server.CreateObject("ADODB.Recordset")
objRS.Open strSQL, objConn
objRS.Close
Set objRS=Nothing
objConn.Close
Set objConn=Nothing
When the user hits submit, the data from the form page is posted to a
"Success" page where the above SQL statement is executed. The data is
successfully inserted; however, the html/asp page that is the "Success"
page is supposed to summarize the data for the user gives me the
following error:
Error Type:
ADODB.Recordset (0x800A0E78)
Operation is not allowed when the object is closed.
/incentive/incentive.asp, line 52
I commented out the objRS.Close line and things work (the line with the
error above. Is this proper?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it! Tag: Upload file Tag: 301586
All i want is the first file
When doing a getfolder() I want the first file in the resulting FILES
collection. I don't want to do a for/next cuz the list may be very long.
Just the first file is all. How do I do this? Doin a
Set objFile=Folder.Files(1) generates a Invalid procedure call or agument
error.
Can anyone help?
Thanks! Tag: Upload file Tag: 301577
Drag & Drop table within table
I have an ASP scheduling application in which there are blocks of time,
represented with a table, within another table which is the timeline.
In other words, I have a table with a vertical timeline. Each row represents
a 1/2 hour of time starting at 12 AM. The scheduled job is represented by
another smaller table inside the timeline table which spans vertically the
time alloted for the job. Say if the job was scheduled for 2 hours, the
table would be 8 rows tall and placed in the appropriate rows of the
timeline table, according to the scheduled time.
Anyway, Im looking for a way to be able to drag a scheduled job(table) from
one timeslot to another. Like from a 12 AM starting time to say - 5 AM.
The scheduling table pulls the data from a database so when a job is dragged
and dropped into a new timeslot, the database would need to be updated.
Any ideas on how to accomplish this or suggestions on which direction or
methods I should start to look at?
Thanks in advance! Tag: Upload file Tag: 301570
email asp & smtp in win 2003
Hi
I have email confirmation asp script which is working fine in my
localhost, but If I put into the window 2003 server, it doesn't work,
does anyone haave idea
please help me
thanks in advance
wei Tag: Upload file Tag: 301567
Error object
Hello ev'body!
I'm reading 'ASP in a nutshell' and i'm trying out the error trapping
features. The book says that from ASP 3.0 on there is a server object method
called GetLastError. It also advocates this beiing the best way of analyzing
errors.
I do not have this method on my IIS installation. (All the other ASP code I
run according to the book is ok).
I have Windows NT 4.00.1381 and IIS 4.0 (Is my IIS version to old?) If this
is the case what is the best approach in trapping errors?
TIA
Lars Mollerup
NIVA, Norway Tag: Upload file Tag: 301560
how to put hyperlinks in a grid (flex/hflexgrid)
This is a multi-part message in MIME format.
------=_NextPart_000_0010_01C4AC6C.0EB4EC80
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Is there any way to how to put hyperlinks in a (flex/hflexgrid)?
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.773 / Virus Database: 520 - Release Date: 10/05/2004
------=_NextPart_000_0010_01C4AC6C.0EB4EC80
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1458" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2><FONT face=3DVerdana>Is there any way =
to </FONT><FONT=20
face=3D"Times New Roman" size=3D3><FONT face=3DVerdana size=3D2>how to =
put hyperlinks in=20
a </FONT><FONT face=3DVerdana =
size=3D2>(flex/hflexgrid)?</FONT></FONT></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3D"Times New Roman" =
size=3D3><FONT=20
face=3DVerdana size=3D2><BR>---<BR>Outgoing mail is certified Virus =
Free.<BR>Checked=20
by AVG anti-virus system (<A=20
href=3D"http://www.grisoft.com">http://www.grisoft.com</A>).<BR>Version: =
6.0.773 /=20
Virus Database: 520 - Release Date: 10/05/2004</FONT><FONT=20
size=3D1></FONT></FONT></FONT></DIV></BODY></HTML>
------=_NextPart_000_0010_01C4AC6C.0EB4EC80-- Tag: Upload file Tag: 301558
Help ASP; get last inserted value from one table, insert multiple rows in another table.
I got a problem. And thats.....
First of all, I got these three tables.
------------------- ------------------ ----------------------
tblPerson tblPersonSoftware tblSoftware
------------------- ------------------ ----------------------
PID PName PID* SID* SID SWName
--- ----- --- --- --- ------
1 Thomas 1 1 1 MS Office
2 Mark 1 2 2 Visual Studio
3 Philip 2 3 3 Dreamweaver
. .... 3 1 4 SQL Server
. .... . . . ..........
------------------- ------------------ ----------------------
* - foreign key
Now I got a form in asp, with textbox (to insert persons name into
table 'tblPerson') and checkboxes (created dynamically from table
'tblSoftware'). One can choose check any softwares needed. And these
values should be inserted into table 'tblPersonSoftware'.
First I have to insert persons name into 'tblPerson', get the ID from
it (from the last inserted value), get the values of checked
checkboxes, and insert multiple records in 'tblPersonSoftware' with
PID from the last inserted value in 'tblPerson' and SID with the
values of checkboxes.
I created the form with Dreamweaver. I'll show the code that I have
now.
---------------------------------------------------------------------------------------------
<%
' *** Edit Operations: declare variables
Dim MM_editAction
Dim MM_abortEdit
Dim MM_editQuery
Dim MM_editCmd
Dim MM_editConnection
Dim MM_editTable
Dim MM_editRedirectUrl
Dim MM_editColumn
Dim MM_recordId
Dim MM_fieldsStr
Dim MM_columnsStr
Dim MM_fields
Dim MM_columns
Dim MM_typeArray
Dim MM_formVal
Dim MM_delim
Dim MM_altVal
Dim MM_emptyVal
Dim MM_i
MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (Request.QueryString <> "") Then
MM_editAction = MM_editAction & "?" & Request.QueryString
End If
' boolean to abort record edit
MM_abortEdit = false
' query string to execute
MM_editQuery = ""
%>
<%
' *** Insert Record: set variables
If (CStr(Request("MM_insert")) = "frmNewPerson") Then
MM_editConnection = MM_userverwaltung_STRING
MM_editTable = "dbo.tblPersonen"
MM_editRedirectUrl = "/view-personen.asp"
MM_fieldsStr = "txtName|value"
MM_columnsStr = "PName|',none,''"
' create the MM_fields and MM_columns arrays
MM_fields = Split(MM_fieldsStr, "|")
MM_columns = Split(MM_columnsStr, "|")
' set the form values
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_fields(MM_i+1) = CStr(Request.Form(MM_fields(MM_i)))
Next
' append the query string to the redirect URL
If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And
Request.QueryString <> "") Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" &
Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" &
Request.QueryString
End If
End If
End If
%>
<%
' *** Insert Record: construct a sql insert statement and execute it
Dim MM_tableValues
Dim MM_dbValues
If (CStr(Request("MM_insert")) <> "") Then
' create the sql insert statement
MM_tableValues = ""
MM_dbValues = ""
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_formVal = MM_fields(MM_i+1)
MM_typeArray = Split(MM_columns(MM_i+1),",")
MM_delim = MM_typeArray(0)
If (MM_delim = "none") Then MM_delim = ""
MM_altVal = MM_typeArray(1)
If (MM_altVal = "none") Then MM_altVal = ""
MM_emptyVal = MM_typeArray(2)
If (MM_emptyVal = "none") Then MM_emptyVal = ""
If (MM_formVal = "") Then
MM_formVal = MM_emptyVal
Else
If (MM_altVal <> "") Then
MM_formVal = MM_altVal
ElseIf (MM_delim = "'") Then ' escape quotes
MM_formVal = "'" & Replace(MM_formVal,"'","''") & "'"
Else
MM_formVal = MM_delim + MM_formVal + MM_delim
End If
End If
If (MM_i <> LBound(MM_fields)) Then
MM_tableValues = MM_tableValues & ","
MM_dbValues = MM_dbValues & ","
End If
MM_tableValues = MM_tableValues & MM_columns(MM_i)
MM_dbValues = MM_dbValues & MM_formVal
Next
MM_editQuery = "insert into " & MM_editTable & " (" & MM_tableValues
& ") values (" & MM_dbValues & ")"
If (Not MM_abortEdit) Then
' execute the insert
Set MM_editCmd = Server.CreateObject("ADODB.Command")
MM_editCmd.ActiveConnection = MM_editConnection
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close
If (MM_editRedirectUrl <> "") Then
Response.Redirect(MM_editRedirectUrl)
End If
End If
End If
<%
Dim rsSoftware
Dim rsSoftware_numRows
Set rsSoftware = Server.CreateObject("ADODB.Recordset")
rsSoftware.ActiveConnection = MM_userverwaltung_STRING
rsSoftware.Source = "SELECT SID, SWName FROM dbo.tblSoftware ORDER BY
SWName ASC"
rsSoftware.CursorType = 0
rsSoftware.CursorLocation = 2
rsSoftware.LockType = 1
rsSoftware.Open()
rsSoftware_numRows = 0
%>
<%
Dim rsPersonSoftware
Dim rsPersonSoftware_numRows
Set rsPersonSoftware = Server.CreateObject("ADODB.Recordset")
rsPersonSoftware.ActiveConnection = MM_userverwaltung_STRING
rsPersonSoftware.Source = "SELECT PID, SID FROM dbo.tblPersonSoftware"
rsPersonSoftware.CursorType = 0
rsPersonSoftware.CursorLocation = 2
rsPersonSoftware.LockType = 1
rsPersonSoftware.Open()
rsPersonSoftware_numRows = 0
%>
<html>
<body>
<form action="<%=MM_editAction%>" method="POST" name="frmNewPerson">
<table>
<tr valign="baseline">
<td nowrap align="right">Name:</td>
<td> <input type="text" name="txtName" value="" size="32"> </td>
</tr>
<tr valign="baseline">
<td nowrap align="right" valign="top">Software:</td>
<td>
<table border="0">
<tr>
<%
colCount = 1
While ((Repeat1__numRows <> 0) AND (NOT rsSoftware.EOF))
If colCount mod 4=0 Then
%>
<td><input type="checkbox" name="chkSoftware"
value="<%=(rsSoftware.Fields.Item("SID").Value)%>">
<%=(rsSoftware.Fields.Item("SWName").Value)%></td>
</tr>
<tr>
<% colCount = colCount+1
Else
%>
<td><input type="checkbox"
name="chkSoftware<%=(rsSoftware.Fields.Item("SID").Value)%>"
value="<%=(rsSoftware.Fields.Item("SID").Value)%>">
<%=(rsSoftware.Fields.Item("SWName").Value)%></td>
<% colCount = colCount+1
End If
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
rsSoftware.MoveNext()
Wend
%>
</table>
</td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="frmNewPerson">
</form>
</body>
</html>
--------------------------------------------------------------------------------------------- Tag: Upload file Tag: 301557
Web Site not Updating when File Uploaded
I am trying to upload a new version of a file that already exists on my web
site. It asks me to overwrite and I choose yes. But when I go to the web
page, even a half hour after the upload, the orginal content of the page is
still there. I have tried uplaoding several times in IE and FTP voyager.
There are no errors reported during the upload. FTP voyer is using binary
upload for sure.
Also, I deleted the file I am trying to update on the web site in the FTP
program but the orginal file is still there!? When I type the URL of the
orginal file, it appears in its orginal state. I would expect a page not
found error since the file is deleted.
I have cleared the temporary files in IE, used refresh, and closed all
windows and went to the page again. However, the orginal file is still there.
I'm not sure what this web site is running, but it supports ASP. I think its
IIS. I have experienced this same porblem on other web sites run with IIS.
The file I am trying to upload is an ASP file with VBscript. Any ideas on how
I can fix it? Thanks for the help. Tag: Upload file Tag: 301542
HELP! ASP and SQL problem.
Ok, I have an ASP page that I use to add several pieces of information
to a database and also display that information in an edit mode. The
problem is, when I use the page for edit, not all of the info is drawn
out of the database. Some of the information is drawn out and
displayed properly, but other information is not. The strangest part
is if I do a response.write to display the objRS() from the database
of a field that isn't coming up, it works. Here is the code to show
you what I'm talking about.
This is really weird, and any help would be GREATLY appreciated.
Thanks!
<html>
<head>
<title>~Data Entry~</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
</head>
<body>
<%
Dim edit
Dim id
DIM objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString =
"dsn=firms;uid=ssl_firms_admin;pwd=stacibeth;network=dbmssocn"
objConn.Open
DIM objRS
Set objRS = Server.CreateObject("ADODB.Recordset")
DIM mySQL
DIM company, address1, address2, city, state1, zip, county, site,
contact, contactlast, title, phone, email, premium, desc
edit=Request.QueryString("edit")
id=Request.QueryString("id")
if edit="1" then
mySQL= "SELECT * FROM agencies WHERE agency_id=" & id & ""
objRS.Open mySQL, objConn
response.write(objRS("phone_number"))
response.write("foo" & objRS("email_address"))
company = objRS("company_name")
address1 = objRS("street_address_1")
address2 = objRS("street_address_2")
city = objRS("city")
county = objRS("county")
state1 = objRS("state")
desc = objRS("description")
site = objRS("website_link")
contact = objRS("contact_person")
contactlast = objRS("contact_person_last")
title = objRS("contact_person_title")
phone = objRS("phone_number")
email = objRS("email_address")
premium = objRS("premium")
zip = objRS("zip")
end if
DIM objSelectedClassifications
Set objSelectedClassifications = CreateObject("Scripting.Dictionary")
if edit="1" then
DIM existingQuery
existingQuery = "SELECT * FROM agency_classification_rel WHERE
agency_id = " & id
DIM objExistingRS
SET objExistingRS = Server.CreateObject("ADODB.Recordset")
objExistingRS.Open existingQuery, objConn
Do While Not objExistingRS.EOF
objSelectedClassifications.Add
CSTR(objExistingRS("classification_id")), ""
objExistingRS.MoveNext
Loop
Set objExistingRS = Nothing
end if
DIM categoryQuery, countyQuery
categoryQuery = "SELECT category_id, category_name FROM
agency_categories ORDER BY category_sort"
countyQuery = "SELECT county_id, county_name FROM counties ORDER BY
county_name"
DIM objCategoryRS, objSubcategoryRS, objClassificationRS, objCountyRS
SET objCategoryRS = Server.CreateObject("ADODB.Recordset")
SET objSubcategoryRS = Server.CreateObject("ADODB.Recordset")
SET objClassificationRS = Server.CreateObject("ADODB.Recordset")
SET objCountyRS = Server.CreateObject("ADODB.Recordset")
objCountyRS.Open countyQuery, objConn
Dim countyOptions
countyOptions = "<option value=""0"">None</option>"
Do While Not objCountyRS.EOF
countyOptions = countyOptions & "<option value=""" &
objCountyRS("county_id") & """"
if CSTR(objCountyRS("county_id")) = CSTR(county) then
countyOptions = countyOptions & " selected"
end if
countyOptions = countyOptions & ">" & objCountyRS("county_name") &
"</option>"
objCountyRS.MoveNext
Loop
Set objCountyRS = Nothing
%>
<form name="companyform" method="post" action="companysubmit.asp">
<table border="0" cellspacing="0" cellpadding="4">
<tr>
<td>Company Name:
<input name="company" type="text" id="company" <% if company <>
"" then %>value="<%=company%>" <%end if%>size="75"></td>
</tr>
<tr>
<td>Street Address 1:
<input name="address1" type="text" id="address1" <% if address1
<> "" then %>value="<%=address1%>" <%end if%>size="75"></td>
</tr>
<tr>
<td>Street Address 2:
<input name="address2" type="text" id="address2" <% if address2
<> "" then %>value="<%=address2%>" <%end if%>size="75"></td>
</tr>
<tr>
<td>City:
<input name="city" type="text" id="city" <% if city <> "" then
%>value="<%=city%>" <%end if%>>
State:
<input name="state" type="text" id="state" <% if state1 <> "" then
%>value="<%=state1%>" <%end if%> size="4" maxlength="2">
Zip:
<input name="zip" type="text" id="zip" size="10" <% if zip <> ""
then %>value="<%=zip%>" <%end if%> maxlength="5">
</td>
</tr>
<tr>
<td>County:
<select name="county">
<%=countyOptions%>
</select></td>
</tr>
<tr><td>
<table border="0" cellspacing="0" cellpadding="2"><tr>
<%
objCategoryRS.Open categoryQuery, objConn
Do While Not objCategoryRS.EOF%>
<td>
<strong><%=objCategoryRS("category_name")%>:</strong><br>
<select name="classifications" size="15" multiple>
<%
DIM subCategoryQuery
subCategoryQuery = "SELECT subcategory_id, subcategory_name FROM
agency_subcategories WHERE category_id = " &
objCategoryRS("category_id") & " ORDER BY subcategory_sort"
objSubCategoryRS.Open subCategoryQuery, objConn
Do While Not objSubCategoryRS.EOF%>
<option value="" style="background-color:CC3333"
disabled>-=<%=objSubCategoryRS("subcategory_name")%>=-</option>
<%
DIM classQuery
classQuery = "SELECT classification_id, classification_name from
agency_classifications WHERE subcategory_id = " &
objSubCategoryRS("subcategory_id") & " ORDER BY classification_sort"
objClassificationRS.Open classQuery, objConn
Do While Not objClassificationRS.EOF
Response.write("<option value=""" &
objClassificationRS("classification_id") & """")
if objSelectedClassifications.Exists(CSTR(objClassificationRS("classification_id")))
then Response.write(" selected") end if
Response.write(">" & objClassificationRS("classification_name") &
"</option>")
objClassificationRS.MoveNext
Loop
objClassificationRS.Close
objSubCategoryRS.MoveNext
Loop
objSubCategoryRS.Close%>
</select>
</td>
<%
objCategoryRS.MoveNext
Loop
Set objCategoryRS = Nothing
Set objSubCategoryRS = Nothing
Set objClassificationRS = Nothing
%>
</tr></table>
</td></tr>
<tr>
<td>Web Site:
<input name="site" type="text" id="site" <% if site <> "" then
%>value="<%=site%>" <%end if%> size="60"></td>
</tr>
<tr>
<td>Contact Person First Name:
<input name="contact" type="text" id="contact" <% if contact <> ""
then %>value="<%=contact%>" <%end if%>>
Last Name:
<input type="text" name="contactlast" id="contactlast" <% if
contactlast <> "" then %>value="<%=contactlast%>" <%end if%>></td>
</tr>
<tr>
<td>Contact Person Title:
<input name="title" type="text" <% if title <> "" then
%>value="<%=title%>" <%end if%> id="title"></td>
</tr>
<tr>
<td>Phone Number:
<input name="phone" type="text" id="phone" <% if phone <> "" then
%>value="<%=phone%>" <%end if%>>
Email:
<input name="email" type="text" id="email" size="40" <% if email
<> "" then %>value="<%=email%>" <%end if%>></td>
</tr>
<tr>
<td>Premium Member:
<input name="premium" type="checkbox" id="premium" value="yes" <%
if premium <> "" then %>checked<%end if%>></td>
</tr>
<tr>
<td>Description of Services:<br>
<textarea name="description" cols="90" rows="10"
id="description"><% if desc <> "" then %><%=desc%><%end
if%></textarea></td>
</tr>
<tr>
<td><input type="submit" name="Submit" value="Submit"></td>
</tr>
</table>
<input type="hidden" value="<%=edit%>" name="edit">
<input type="hidden" value="<%=id%>" name="id">
</form>
</html>
<%
Set objRS = Nothing
objConn.Close
Set objConn = Nothing
%> Tag: Upload file Tag: 301536
Submitting checkboxes
I wonder if there is a way to submit all checkboxes (names and values)
no mater if they are off or on (checked / unchecked). Anybody would know
some scripts or tricks to get this working.
Thanks,
John R. Tag: Upload file Tag: 301532
Easy date formatting question
I have a variable that represents a standard mm/dd/yyyy date , but i
want to change it to just October 6
''''
datepart("m","d" , mydatevariable)
'''''
...doesnt work.
Muench
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it! Tag: Upload file Tag: 301530
Save Current ASP as an image
Hi,
Is there a way to save the client side opened asp page as
a image file to the server side.
That is take a screen shoot of the page and save it as a
file preferrable html file or some image file and save it
onto the server.
Thanks. Tag: Upload file Tag: 301525
Show Hide with ASP
Hi All
It's been several years since I've done any ASP programming and I've
recently been thrown back into it so I am very rusty, to say the least.
I use a javascript, in regular html, you click on the link and it
displays more information below:
<!--
function openIt(FAQ) {
showIt = document.all(FAQ);
if (showIt.style.display == "none") {
showIt.style.display = ""
} else {
showIt.style.display = "none"
}
}
//-->
<A href="#" onclick="Javascript:openIt('Answer2'); return false;"><img
src="images/plus.gif" border="0"></A> Another question?
<DIV id="Answer2" style="display:none">
<img src="images/arrow_down.gif"> Another answer!!
</DIV>
rather than store everything in a static page all the information is in
a database and I can use the following ASP code to display it:
'Write the HTML to display the current record in the recordset
Response.Write (rsCallLog("ID"))
Response.Write (" <b>")
Response.Write (rsCallLog("Question"))
Response.Write ("</b> ")
Response.Write (rsCallLog("Date"))
Response.Write (" ")
Response.Write (rsCallLog("Answer"))
Response.Write ("<br>")
'Move to the next record in the recordset
rsCallLog.MoveNext
however this displays both the question and answer, i would like to hide
the answer until a link is clicked
now my porblem is this, whenever I try to integrate the show/hode
javascript I keep getting errors and it displays nothing, I know the
problem is with how I am coding it, there is somehting wrong with my
syntax, I know that when you want a quote mark to be displayed as html
code you have to double the quote mark, but I think I'm missing a lot
more than that
I have been trying, very unsuccessully for the last day to find my
answer on the web and there is nothing about making that javascript work
in asp
If anyone can point me in the right direction here that would be greatly
appreciated
Thanks Tag: Upload file Tag: 301523
After recent auto IE patch, jscript form submit generates 2 http P
My company has an application that embeds IE. After a recent automatic IE
patch was installed, if the amount of data posted from a form is larger than
some limit, something messes up and the http POST message is not handled
correctly. The cutoff seems to be a content-length of about 1000 bytes.
When the IE option "Show friendly http error messages" is off, the POST
request is usually submitted twice. The http header for the 2nd POST is
formatted differently from the first, but equivalent. When this happens,
sometimes the followng redirect happens, but the browser state is messed up -
some frames not showing.
When IE option "Show friendly http error messages" is on, something stops
before the 2nd submit and no redirect happens.
We have a win 2000 system that runs the same code without problems. We have
2 XP systems that used to work, perhaps a month ago, but now both have this
problem. They have not been upgraded to XP SP2, but the automatic IE update
option was on. I suspect Q831167, or maybe Q815021. Q831167 appears in the
IE about box, but not in the control panel add/remove list, so I'm not sure
how to remove it.
Suggestions?
Thanks Tag: Upload file Tag: 301522
Files not found after FTP
We have an application that uses WinInet and ASP to transfer files from an
application server to a web server via an FTP component based on WinInet. An
ASP page calls this component to transfer the requested file then opens the
file and loads it into ADODB.Stream in order to download it to the user.
Things work fine up to the point where the Open|Save|Cancel dialog appears.
If the user clicks Open or Save, a fair percentage of the time, they get a
"File not found" error displaying the file name followed by a bracketed
number, e.g. file[1].txt. The reason the launching application can't find
the file is because of the bracketed number which is appended somewhere in
the process after the FTP download is completed. Question 1: where does the
bracketed number come from? Question 2: how can I prevent it from occurring?
Thanks. Tag: Upload file Tag: 301521
downloading pdf file
Hi,
I may have posted this before but I was not clear.
From the client side, I want to download a pdf file from
the server side that was initially saved there.
this site didnt work for me:
http://aspfaq.com/show.asp?id=2161
Other help will be much appreciated.
Thanks Tag: Upload file Tag: 301519
refresh without "retry / cancel" message
hi
i'm doing a reload() in JS
in the production site i get the message
"send again information...... : retry / cancel"
but in development site works fine
what differencia could be between
the configuration of both IIS
that allow these refresh or reload() ?
thanks
--
atte,
Hernán Castelo
SGA - UTN - FRBA Tag: Upload file Tag: 301516
sending german text in an email from a webpage
Hello Everyone,
I have email form on a website and there is some fields that have german
characters in it, like the umlat and so on, when I look at the email that is
retuyrned I get the following message
Form Name: E-Mail/Fax-Formular für den ValuePark
========== Other Data: ==========
URL: Test@þûúÿþúù
%C3%9Cbermitteln+Sie+mir+bitte+folgende+Informationen+%C3%BCber+den+ValuePark%3A:
submitButtonName: Absenden
Does anyone have any ideas on how to stop this from happening. Thanks.
--
J.D. Tag: Upload file Tag: 301508
Retrieving the x-receiver list from a CDO Message using the Fields Collection
Hello
I am trying to write a routine that will retrieve all the messages in my
SMTP Service Drop Folder and process them one by one based on the
address(es) to which the mail was sent.
When accessed via a CDO.Message each message in the drop folder has an
x-receiver field present containing only the email address of the reciepient
that caused the message to arrive on my server. This is useful because I
don't have to check the To, CC and BCC fields or strip out names from
addresses that are formated like "Forename Surname"
<forename.surname@domain.com>.
I can then look up the receiver in my database based on the email address
alone.
The problem is that if a message is sent to two people on my server, there
will be two x-receiver lines in the email but the fields collection only
contains one. I guess this might be due to naming or something, as two
fields can't have the same name, but how do I get the full list of
recipients.
I have looked in to smtpenvelope/recipientlist and a few other things, but
they are either not present or do not work.
Has anyone come across this before or have any ideas?
Code so far, which lists all the fields and only shows the first x-receiver
when the email starts with two:
Set objDropDir = CreateObject("CDO.DropDirectory")
Set objMessages = objDropDir.GetMessages(DROP_DIR)
iMessages = objMessages.Count
If iMessages > 0 Then
For iMessage = iMessages To 1 Step -1
For Each objField In objMessages.Item(iMessage).Fields
MsgBox objField.Name & ": " & objField.Value
Next
Sample email snip:
x-sender: david@test.com
x-receiver: al@test.com
x-receiver: mike@test.com
Thanks
David Tag: Upload file Tag: 301503
CDONTS
Hi people -
I've been trying to make run this form mail with CDONTS but doesnt work at
all!
it's the first time am using it,could anybody check out where the error
might be and let me know, please?
I trust in you, please help me
- bye tom
***************************************************************************
<!-- #include file="include/jconn_dati.asp" -->
<html>
<head>
<link rel="stylesheet" type="text/css" href="../~style/style.css">
<script Language="Javascript">
<!--
function ControllaForm()
{
var controllo=false;
var stringV=""
var stringL=""
var stringE=""
var string=""
var doc=document.info
if (doc.user_email.value == "" ){controllo=true;stringV=stringV+"\n-
E-MAIL";}
RE =
/^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9
\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/
if(RE.test(doc.user_email.value)==false){controllo=true;stringE = stringE
+ "\n- E-MAIL"; }
if (doc.int_problema.value == "" ){controllo=true;stringV = stringV + "\n-
PROBLEMA";}
if (doc.int_problema.value.length > "1040" ){controllo=true;stringL =
stringL + "\n- PROBLEMA (max.1040)";}
if (stringV != ""){string = "\nI seguenti campi non sono stati
compilati:"+"\n"+stringV;}else{
if (stringL != ""){string = "\nI seguenti campi superano il limite di
caratteri\nad essi consentito:"+"\n"+stringL;}else{string = "\nI seguenti
campi contengono dati non validi:"+"\n"+stringE;}}
if (controllo){alert("ERRORI RILEVATI NEL
FORM:"+"\n"+string+"\n"+"\nCORREGGERLI PER POTER PROSEGUIRE");}else{
var messaggio = window.confirm("INVIARE IL FORM A MYCOMPANY?"); if
(messaggio){info.submit();}}
}
// -->
</script>
</head>
<body>
<%
user_email=request.form("user_email")
problema=request.form("int_problema")
applicazione=request.form("int_appl")
'int_email=request.form("int_email")
if action="send" then
messaggio="La sua e-mail è <strong>stata inviata</strong>. I nostri
tecnici risponderanno appena possibile.<br><br><a
href='contattaci_bs.asp'>[Indietro]</a>"
if (user_email<>"") AND (problema<>"") AND (applicazione<>"") then
corpo="<html><head><title>BIESSE SISTEMI INFORMATIVI - MODULO
CONTATTACI -</title><style> BODY{background-color: white;font-family:
Verdana, Helvetica;font-size: 8pt;}</style></head><body><br><b>E-MAIL
GENERATA AUTOMATICAMENTE </b><br><br><br>il: "&now()&"<br><br>"
corpo=corpo&"<b>USER EMAIL:</b> " &request.form("user_email")&"<br>"
corpo=corpo&"<b>PROBLEMA:</b> " &request.form("int_problema")&"<br>"
corpo=corpo&"<b>APPLICAZIONE:</b> " &request.form("int_appl")&"<br>"
corpo=corpo&"</body></html>"
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.From = user_email
objMail.To = " myname@mydomain.com "
objMail.Subject = oggetto
objMail.BodyFormat = 0
objMail.MailFormat = 0
objMail.Body = corpo
objMail.Importance = 1
objMail.Send
Set objMail = Nothing
else
messaggio="Tutti i campi del modulo sono <b>obbligatori</b>. Impossibile
inviare la tua e-mail.<br>Torna indietro e compila tutti i campi.<br><br><a
href='frm_ric.asp'>[BACK]</a>"
end if
%>
<div align="center"><center>
<table border="0" width="94%">
<tr>
<td width="100%" align="center"><%=messaggio%></td>
</tr>
</table>
</center></div>
<%
else
%>
<form NAME="info" METHOD="post" align="center"
action="home.asp?action=send">
<table width="50%" border="0" cellspacing="0" cellpadding="8">
<tr>
<td width="20%">Email</td>
<td width="80%">
<input type="text" name="user_email" value="<%=user_email%>"
size="60">
</td>
</tr>
<tr>
<td width="20%">Problema</td>
<td width="80%"><textarea name="int_problema" value="<%=int_problema%>"
rows="6" cols="60"></textarea></td>
</tr>
<tr>
<td width="20%">Applicazione</td>
<td width="80%">
<select name="int_appl">
<% if session("home_body") = "SW" then%>
<!-- #include file="include/cbo_sw.asp"-->
<%else%>
<!-- #include file="include/cbo_hw.asp"-->
<%end if%>
</select>
</td>
</tr>
<tr>
<td width="20%"> </td>
<td ALIGN="center" width="80%"><div align="left"><p><strong><a
href="javascript:ControllaForm()">INVIA</a></strong></td>
</tr>
</table>
<%end if%> Tag: Upload file Tag: 301499
Can you have multiple website on IIS6 to use one global.asa
Hi, This my problem, we are migrating our intranet from IIS5 to IIS6 an
have decided to split various sections of the intranet to seperat
domain hosts,
e.g. we had:
www.intra.domain.com
BUT NOW HAVE:
depts.intra.domain.com
www.intra.domain.com
apps.intra.domain.com
My question is we now have all these hosts running off the same IIS
and with unique host headers, but we want them to share just the on
global.asa file not have their own individual global.asa file.
Cheers
Mark
-
nomad
-----------------------------------------------------------------------
Posted via http://www.webservertalk.co
-----------------------------------------------------------------------
View this thread: http://www.webservertalk.com/message423230.htm Tag: Upload file Tag: 301498
windows 2003 vb6 debug - still fails after dcom fix!
Anyone running windwos 2003 who has tried the msdn dcom fix [kb
259725] and still cant debug in vb6?
Despite setting the permissions as discussed in the article i still
just get:
---
Server object error 'ASP 0177 : 80080005'
Server.CreateObject Failed
/LM/W3SVC/431032598/Root/global.asa, line 150
80080005
---
I have tried both binary and no compatibility in vb and no joy
either...
Any thoughts massively appreciated as i need this running yesterday!!!
Regards, dan m Tag: Upload file Tag: 301496
Urgent Help - ASP & FoxPro Db
Hi,
I have a web site that is built using FOxpro database
(free table directory) running on a Win2003 server and
IIS 6.
I am using a DSN as the connection string to the DB.
To connect to the database I am using ADODB.Record,
Cursor Type of Static, Lock Type of Readonly, command
type of adCmdText.
The site was running for 6 days OK and then suddenly the
site 'stopped working'.
By 'stopped working' I noticed that the site would dislay
static .HTM & HTML pages but not any .asp pages.
I also noticed that some of the database files
(.dbf, .cdx .fpt) were locking up and not releasing. When
trying to FTP new files across I was getting a 550
error 'File in use by another process' and the system
administrator cannot delete the files either.
THe SA said that he could not see any rogue process that
had grabed the files and was at a loss as to the next
step.
I really need help on this - so any insight as to what
might be the problem would be great.
I have tried to give as much info here but if you need
any more that might help with diagnosis please let me
know and I will and get back to you. Tag: Upload file Tag: 301495
Crystal Report Login Problems in SP
Hi! I try to preview a crystal report using asp,
it prompt 'CRAXDRT error Occured on server. -2147189176 : login failed
Details : IM002:[Microsoft][ODBC Driver Manager] Data sourcename no
found and no default driver specified'.
I use below syntax,
For Each mnTable in mainReportTableCollection
With mnTable.ConnectionProperties Tag: Upload file Tag: 301493
Very easy: difference between aspx and asp
Hi there,
I am quite new in terms of server side programming. I understand how asp
scripting works and how you put <% %> around your server script. However this
is .asp .......what is .aspx? is this the new version ASP.nET?
I dont understand how it works when i create a new aspx project in
vstudio.net and i create a aspx page in design view. I add a button and then
double click it to add code to that button. I dont see any html code around
it?? In an asp page the server side code is surrounded by html code!
An aspx page almost looks like a normal vb application, why is there no html
code around?
Thanks,
Joshua Weir Tag: Upload file Tag: 301483
User dependant css
I am developing a webapplication for a company holding
stocks for a number of customer companies. The customers
can order parts via this new appliction. My application
is linked to each of the customers' home pages. I want
each user to 'believe' he still is in his company's pages
by changing logo and i.e. backcolor depending on company.
A person from company A will see his company's logo and
colors and a person from company B will simultanously see
his company's logo and colors. Can I achieve this with
css. In that case How? Or is there another better method.
Hope you can help me.
Eje Tag: Upload file Tag: 301478
Hyperlinking in a returned recordset
I have a customers table in my database (SQL 2k) with a column called
[E-mail]. What I would like to set up (if possible) is to have the ASP
page, as it returns the requested recordset, if it has an email address
to display the email address as a hyperlink (i.e. mailto:
someone@somedomain.com) while showing the email address so the end users
can just click on the email address field and have it pull up a new mail
message with the To: address filled in.
Thoughts?
Thanks in advance.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it! Tag: Upload file Tag: 301476
Permission denied: 'createobject'
I've been here before, I've set this working on an NT 4 server, but for
the life of me, I can't remember the trick...
In full, I'm opening a doc in word 2k on the server - win2k adv - to print
to file as .ps, for conversion via Acrobat distiller
set wordapp = createobject("word.application")
is generating:
Microsoft VBScript runtime error '800a0046'
Permission denied: 'createobject'
/test/print.asp, line 32 Tag: Upload file Tag: 301474
HI, I'd like to save images from urls ?
I need to save images with a procedure that i get it the url of image.
if anyone know about this problem, let me know? Thank you
"?????" <@discussions.microsoft.com> wrote in message
news:349568E2-1F42-413A-BAB0-6C84B180C8E6@microsoft.com...
> HI, I'd like to save images from urls ?
> I need to save images with a procedure that i get it the url of image.
>
> if anyone know about this problem, let me know? Thank you
>
>