Problem with CDO
I have russion text in my database.
my aspPage is:
session.CodePage="1251"
sql="SELECT text from testRuski where id=1"
text=connection.execute(sql).Fields.Item(0).Value
Set objMail = Server.CreateObject("CDO.Message")
HTML = "<!DOCTYPE HTML PUBLIC ""-//IETF//DTD HTML//EN"">" & NL
HTML = HTML & "<html>"
HTML = HTML & "<head>"
html=html&"<META HTTP-EQUIV="&chr(34)&"Content-Type"" Content=""text-html;
charset=Windows-1251"">"
HTML = HTML & "</head>"
HTML = HTML & "<body>"
HTML = HTML & text&"<BR></body>"
strBody="Your string in native language"
objMail.HTMLBody=html
objMail.To="simon.zupan@stud-moderna.si"
objMail.From="info@stud-moderna.si"
objMail.Subject="test"
objMail.Send
set objMail=nothing
response.write html
response.end
On my page, I see:
??????????, ??????? ? ????????? ????
so russion text like it should be
but when I get email, I see:
??????????, ??????? ? ????????? ????
Where is the problem, how can I solve this?
Thank you,
Simon Tag: crm Tag: 292582
asp application security
A little background first.. I'm working from home.. no real team to bounce
ideas off of, so you guys are it.
I'm working on an app SQL2k / ASP Classic, the quick and dirty is there is a
"worklist" of items for users to fix items so that the bill can be payed,
and there are also a series of reports. All items are grouped into 1 of 12
categories. Users are members of one of those 12 groups (categories).
A users worklist can be "filtered" by an admin based on location, bill
amount, first letter of payee's last name etc. Individual report access is
also limited based on user rights.
So.. how to maintain user security. A couple of ideas..
When a user logs in.. put a bunch of stuff into session variables that I can
then access as needed.
Second idea is to put just the logged in userID into a session variable, and
then call an SP or a function to check security as needed.
Third idea is to load up an array on login, stuff it on the session, call a
function on the page(s) as needed to check for appropriate rights
Last.. stuff some security info into a user specific Application var, and
call that as needed.. and then kill it on logout
Thanks for reading.. any thoughts on which may work better? Or a better
solution perhaps?
Thanks! Tag: crm Tag: 292581
Visual Studio .Net with ASP 3.0
Could someone point out some information on connecting Visual Studio.Net to
an existing asp app?
I have one developer who'd like to use the new IDE, but the warning that
pops up when he connects sounds pretty dire. That is, that it will no
longer be usable by previous versions.
Thanks
TomB Tag: crm Tag: 292577
Problem with file uploading new to asp.. Need help
Hi i have a problem in asp.ne
i am uploading file to the server using htmlinput controls and every thing is o
but i try to upload larger file to the server like more than 4 mb and about 10mb i got server connection lost and time out some no responce
is there any solution to that problem using asp.net and c
thank Tag: crm Tag: 292573
ASP page done - How do I get it out there?
Hi all!
I've written and tested my ASP page using the Localhost. It works fine.
Now I'm ready to deliver it to the rest of the company. How do I put it out
there? Point me somewhere, please. My Google search ("how to publish
intranet page") was woefully inadequate.
The SQL Server is a Win2k machine, and that is also the machine I would like
to host the Intranet page. I don't know what else to tell you about our
environment. There will probably only be 5-10 users hitting the page (for
now). And for now, the ASP page (yes just one page) is the only page.
cheers,
Matt. Tag: crm Tag: 292570
what process do you go through to cost out a project?
is there an industry standard method of costing out a project
the problem i have is that when talking to a developer they say "i dont know
how long it will take" which just isnt acceptable
#
mark Tag: crm Tag: 292561
Dateadd in SQL statement not working
Greetings,
I am having a problem getting a SQL statement that is functional in
Access 2K to work in ASP.
My Access SQL statement is this:
SELECT DateAdd('s',Ticket_Opened_Date,'Dec 31, 1969 8:00:00PM') AS
Opened_Date, AL.Last_Significant_Update_Date AS Last_Updated,
AL.Due_Date AS Ticket_Due_Date, AL.Managing_Station,
AL.Ticket_Opened_Date, AL.Short_Description, AL.Source, AL.Comments,
AL.Member_Visible_Outage_, AL.Impact_Comments, AL.Ticket__,
AL.External_Ticket__, AL.Last_Significant_Update_Date, AL.Due_Date,
AL.Status
FROM dbo_AL_Problem_Management AS AL
WHERE (((AL.Managing_Station)="NOC/ALnet" Or (AL.Managing_Station)="
IOC") AND ((AL.Status)<>4));
The error message from the browser is:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[MERANT][ODBC Sybase driver][SQL Server]Incorrect syntax near AL.
The SQL statement in ASP is:
sql = "SELECT DateAdd('s',Ticket_Opened_Date,'Dec 31, 1969 8:00:00PM')
AS Opened_Date, AL.Last_Significant_Update_Date AS Last_Updated,
AL.Due_Date AS Ticket_Due_Date, AL.Managing_Station,
AL.Ticket_Opened_Date, AL.Short_Description, AL.Source, AL.Comments,
AL.Member_Visible_Outage_, AL.Impact_Comments, AL.Ticket__,
AL.External_Ticket__, AL.Last_Significant_Update_Date, AL.Due_Date,
AL.Status
FROM dbo_AL_Problem_Management AS AL
WHERE (((AL.Managing_Station)="NOC/ALnet" Or (AL.Managing_Station)="
IOC") AND ((AL.Status)<>4)) "
Any help would be appreciated.
Thank you,
Brandon
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it! Tag: crm Tag: 292560
help in database updations.
Hi all,
Let me first explain what I am trying to do. I have a web app, where from my
asp page, i call a stored procedure.
Now this page is used by N users concurrently. This SP updates a table,
updates a second table with first as ref,
and clear first table. in between there is a delay of few seconds, which i
have explicitly put( waitfor delay command)
but teh problem appears when some users at the same time use this page, and
update table, then the records by only one user are present in the table,
the same for all teh other users are found missing later.
why are the updations made by the other users not updated in the second
table?
what am I missing here?
TIA. Tag: crm Tag: 292555
Problems dynamically filling an array
Hi all,
I am trying to dynamically fill an array with any unique values from a field
(objRS.Fields(5)) in my database with the following code below. However it
errors with "The array is fixed or temporarily blocked" for the line "REDIM
PRESERVE UserArray(Arraycount+1)". I can't seem to get around this. Any
suggestions? Many thanks.
Dim p
Dim UserArray(0) ' Max number of users
Dim Arraycount
Dim flag
objRS.MoveFirst
Do While Not objRS.EOF
p = 0
flag = false
'--Check if username is already in the array
Arraycount = UBound(UserArray)
do while (p <= Arraycount) And (flag = false)
if objRS.Fields(5) = UserArray(p) then flag = true
P=P+1
loop
if (flag = false) then ' name not in array
UserArray(Arraycount) = objRS.Fields(5)
REDIM PRESERVE UserArray(Arraycount+1)
End if
objRS.MoveNext
Loop Tag: crm Tag: 292543
Argrggh - host doesn't support server-side includes
I've just been caught out by a host that doesn't support #includes in my
ASPs. What's the best strategy for replacing these calls to files that
include everything from subs and functions, global constants, other
#includes, script directives, etc.??
Thanks,
Alan Tag: crm Tag: 292540
connection string causes blank page
I am developing a website in ASP that connects to a Sybase database.
However, when I try to open a connection to the database the page will not
load. The script does not timeout, nor the connection. Further, the Sybase
server shows no connection. Because the page is hanging I am unable, with my
limited knowledge, to query the error collection.
After many tries I will get an error page ...HTTP 403.9 Access forbidden:
Too many users are connected
I have created a connection string using the native sybase ole db provider
'Provider=Sybase.ASEOLEDBProvider.2' in Visual InterDev which can view the
database with all its tables, data etc with no problem whatsoever.
I am using Sybase ASE 12.5 developer edition (the server that is available
free from the Sybase site), on a laptop running XP Professional.
I have also tried using a Data Source .ids file within the connection string
as well as without.
Can anyone give me a clue as to how I might progress in tracking the
error(s)? Tag: crm Tag: 292537
creating thumbnails
Is it possible to create thumbnails on-the-fly in ASP? I'm aware of
ASPImage, but that appears to create actual files. I want to know if I can
make 300 x 300 pixel artwork, and have ASP generate any size I prefer. Maybe
I want 50 pixel on this page and 92 pixel on another. I realize I can set
the height and width, but I want to actually decrease the download size
also. I don't want to recreate a new file for every size. Is this possible?
thanks Tag: crm Tag: 292522
GLOBAL.ASA in a subdirectory?
Will IIS6.0 recognize a global.asa file located in a subdirectory on the
webserver?
I'd like a file that will execute whenever a file in the subdirectory is
browsed - or, at least it is executed the first time a file in the
subdirectory is browsed.
Thanks! Tag: crm Tag: 292511
Here's a tricky one! How to transfer a file from one Web server to another.
I would like for an ASP page to transfer a text file (from the same
directory the ASP file is in) to another Web server.
I don't mind if the code is in ASP or VB.
Any ideas?
I suspect that there is a way of having an ASP page conduct an FTP session
to transfer the file.
I would like to do this without a component as I'm looking for source code.
Thanks in advance....
Darcy Tag: crm Tag: 292509
asp related problem with outlook mobile access
I keep getting this message when logging on OMA
Server Error in '/OMA' Application.
-----------------------------------------------------------
---------------------
Configuration Error
Description: An error occurred during the processing of a
configuration file required to service this request.
Please review the specific error details below and modify
your configuration file appropriately.
Parser Error Message: Unable to read the security policy
file for trust level 'WSS_Minimal'.
Source Error:
Line 62: <compilation batch="false" debug="false" />
Line 63: <pages enableSessionState="false"
enableViewState="true" enableViewStateMac="true"
validateRequest="false" />
Line 64: <trust level="WSS_Minimal" originUrl="" />
Line 65: <machineKey
validationKey="931136B7FEE2F57435D4E659EC257023C289F46BFAA9
7A81"
decryptionKey="D1B16F6296BB1210A71BE5BD30E7EBD21D13D3FEC3DC
8138" validation="SHA1" />
Line 66: </system.web>
Source File: c:\inetpub\wwwroot\web.config Line: 64
-----------------------------------------------------------
---------------------
Version Information: Microsoft .NET Framework
Version:1.1.4322.573; ASP.NET Version:1.1.4322.573 Tag: crm Tag: 292506
Get first day of week?
Need to print "Week of (first day of week)"
First day being Monday.
ie:
week = Request.querystring("mydate")
response.write "Week of" & week
If week = 5/6/2004 (which is Thursday) it should output "Week of Monday, May
03, 2004"
How can I do this?
Thanks! Tag: crm Tag: 292492
how to keep from displaying repeating rows
I tried posting this to the SQL Server programming group, but then thought
more about it, and thought it was more of an ASP question.
If you want the original long description, it's below. But the short version
is, I have created a new table to resolve a many-to-many relationship in my
tech support ticket-tracking app. When I do a query which should yield me
several tickets, it gives me more than one row of the same ticket if that
ticket happens to have more than one row in the new table I just mentioned.
I'd like it to only give me one, but apparently, that isn't going to happen.
So my ASP question is, how can I tell it not do display a row from the
recordset if there is already a row with that same ticket number?
Here's the long version, posted on the SQL group.
=============================================================
First, here's the query:
SELECT T.TKT_TICKETID, T.Orig_Source,T.Contact_CustID,T.orig_CustID AS
OrigCust,
T.Orig_TimeStamp, T.Actual_TimeStamp, MAX(H.TIMESTMP)AS
HistTime,T.BriefDesc,
T.LongDesc,T.InternalDesc,T.Environment,T.AssignedEmployee,T.StatusID,T.Curr
ent_Source,
T.CustomerCode AS CustCode,T.DefectNum,E.FirstName, E.LastName,
S.Description,
S.NameShort AS StatusShort,ISNULL(CU.CustomerName, 'ARGO') AS CustomerName,
ISNULL(CU.NameShort, 'ARGO') AS NameShort,T.LastModified,T.CustTicketID,
TA.EmployeeID AS AssistID
FROM dbo.TKT_TICKET T
INNER JOIN dbo.EMPLOYEE E ON T.AssignedEmployee = E.EmployeeID
LEFT OUTER JOIN dbo.TKT_ASSIST TA ON T.TKT_TicketID = TA.TicketID
INNER JOIN dbo.TKT_STATUS S ON T.StatusID = S.StatusID
LEFT OUTER JOIN dbo.CUSTOMER CU ON CU.CustomerCode = T.CustomerCode
LEFT OUTER JOIN dbo.TKT_HISTORY H ON T.TKT_TICKETID = H.TICKETID
WHERE T.StatusID IN ('2','3','4','5','6','7')
AND T.AssignedEmployee = '200'
GROUP BY T.TKT_TICKETID, T.Orig_Source, T.Contact_CustID,T.Orig_CustID,
T.Orig_TimeStamp, T.Actual_TimeStamp,T.ADSVersion,T.BriefDesc,T.LongDesc,
T.Environment, T.AssignedEmployee,
T.StatusID,T.Current_Source,T.InternalDesc,
T.orig_CustID,T.Current_Source,T.CustomerCode,T.LastModified,T.CustTicketID,
T.DefectNum,E.FirstName, E.LastName,
S.Description,S.NameShort,CU.CustomerName,
CU.NameShort, TA.EmployeeID ORDER BY Orig_TimeStamp
=====================================
Problem Description: As you can see, TKT_Ticket is the main table. I just
created a table called TKT_ASSIST, and it only has the ticket id plus the
employee id, since there can be more than one employee per ticket, and more
than one ticket per employee. I then added to the existing query the last
item you see in the select part, "TA.EmployeeID AS AssistID(plus the
matching part in the GROUP BY)" and then there's a join for the 2 tables.
The problem is, when it is run, the query yields more than one row per
ticket, if that ticket happens to have more than one row in the TKT_Assist
table. In other words, the Assist table was put there to resolve a
many-to-many relationship, but it is still showing me "many" rows of tickets
when one will do.
Here's what is returned (with some stuff smipped for brevity):
15882 03/15/2004 Test ARGO RSCH Possible Memory Leak in Testing
Environment
15913 03/18/2004 Prod CUST RSCH Share Pool errors experienced after
converting from NT to W2000
15998 04/02/2004 Train CUST RSCH HTTP Post Communication Error
15998 04/02/2004 Train CUST RSCH HTTP Post Communication Error
Note that Ticket 15998 is there twice. Sure enough, when I go into the
Assist table, that's the only one with two rows, i.e. two employees attached
to it.
So what adjustments do I need to make to the SQL statement to cause it to
return only one row per ticket? I tried putting the word DISTINCT right
after the word SElECT, but that didn't chagne anything. I changed the INNER
JOIN to an outer one, but that just kept some other tickets off of the list,
and ticket 15998 still showed up twice. Tag: crm Tag: 292483
Short date problem with ASP
Hi
I am in the process of moving my website from NT4/IIS4 to Windows 2003. Both
server are set to a short date format of (dd/mm/yy) however the Windows 2003
server appears to be ignoring this and continues to display dates in asp
pages as dd/mm/yyyy. Is there a setting in Windows 2003 that I am missing?
Thanks
Stephen Tag: crm Tag: 292480
CreateObject error
I've got an asp page using CDONTS for mail. It's running on an NT4
server with the latest updates. I don't have any problems with the
page except I want to convert it to a vbscript (.vbs) file so that I
can schedule it to run with Task Scheduler. So the original page
works fine.
I've copied the page code and edited it to scripting standards and
saved it as a .vbs file. It's on the same server as the original asp
page.
But I get this error when it runs:
ActiveX component can't create object: 'CDONTS.NewMail'
I launch it thru a mapped drive on my local machine and a double
click.
I've searched the www high and low and can't find any solution that
works - or makes sense to me.
Any help is appreciated. Tag: crm Tag: 292479
ASP UPDate database looping through form fields
Hi,
I have a small online survey in two parts designed to allow users to
rank a few organisations that they have dealings with from a large
list of organisations. I want the users to be able to rank a number
of organisations at the same time rather than going through a form for
each one.
At the moment the survey has two pages. The first page allows the user
to select a number of organisations from the list. This selection is
saved in a table in an Access database with five fields: ID, User,
Organisation and Ranking.
The second page loops through the data from the database selected by
user and presents the list of organisations in a table with a row for
each record. The table has a ranking field for each organisation. The
user enters numeric data in this field to rank the organisation.
So far so good. Where I am having problems is in updating the database
with the data from the form. What I need to do is loop through each
line of the table on the form, select the record from the database,
update it and then move to the next item.
The form has a field for each record with the same name so using
Request.Form("FieldName") to grab the data from the form doesn't seem
to work.
I am sure that there must be a way of achieving what I want do: but I
can't get it.
I'd appreciate any suggestions or pointers.
Thanks in advance for any help.
Regards
Emmett Power Tag: crm Tag: 292472
anyone got a good resource for time management
anyone know a good resource that will help me work out a process for
accurateley costing out / setting timescales for a development project.
mark Tag: crm Tag: 292469
Problems with Payflow Pro object (PFProCOMControl.PFProCOMControl.1)
Anyone worked with Verisign's Payflow Pro object in ASP? We've had it
up and running for weeks without a problem and recently we've started
to get some undesirable behavior: at the point where the component
sends the transaction data, about 1 in 4 times it will go through, but
otherwise it will sit and spin until the script or the browser session
times out. may or may not be related to a server maintenance change.
I'm not a server admin guy, so I don't know specifically what to look
for, but can anyone tell me what I should ask our server admin guy to
look for? Could there be something with COM threading or other issues
where multiple instances of this object are being run? Is there a
place on the server where a person can look and see what's going on
with this object?
Here's the code with some info removed... I've marked where it usually
locks or spins:
***************************
Set client = Server.CreateObject("PFProCOMControl.PFProCOMControl.1")
'Transaction through Verisign
parmList = "TRXTYPE=S&TENDER=C&PARTNER=VeriSign&VENDOR=XXXXXXX&USER=XXXXXXX&PWD=XXXXXXX&ACCT=4111111111111111&EXPDATE=0405&AMT=0.01"
Ctx1 = client.CreateContext("test-payflow.verisign.com", 443, 30, "",
0, "", "")
'this next line is what locks up the object or goes into a loop
curString = client.SubmitTransaction(Ctx1, parmList, Len(parmList))
client.DestroyContext (Ctx1)
set Ctx1 = nothing
set client = nothing
***************************
Thanks for your help. Tag: crm Tag: 292467
Size of a file
Hi - given a filename on the server, how would you use the filesystem
object to determine its size?
Thanks,
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it! Tag: crm Tag: 292465
asp submitted to process asp;but calling asp page says:"Page not found" aftr 1hr
Hi all,
I have an user.asp page(has html display) which displays
the controls; After client-side validations, I do a
document.form.submit() to a process asp page(no html, only
server side processing and then redirects to the user.asp).
This process asp calls some dll functions which might take
a couple of hours if number of records to process is huge.
Now, the dll opens a pop-up window which shows the status
of the results(number of records processed and failed).
After exactly 1 hour, the user.asp page says page cannot
be found. Is it due to some timeout or something? What
could be the reason? Tag: crm Tag: 292462
IIS hangs itself
We have an application which uses Crystal Reports, FireBird and dynamic
views to display reports. When in a short period of time a lot of reports
are displayed IIS hangs. Stopping and starting IIS does not help. The only
solution to get IIS working again is a reboot. One time I got a message that
there are to many users. But only once. All the other times it just hangs.
The to many users I do not understand, because at the moment I am the only
one using (testing) the application. Anyone an idea what could be the
problem and how to solve it? Tag: crm Tag: 292457
Is it possible to change global.asa from asp
With global.asa application variables can be set. Later can a script in your
application change the value of those variables. But when IIS is restarted
the old values are used again. Is there a way to get the changes that are
done into global.asa? Tag: crm Tag: 292456
Type Mismatch woes!
Hi all,
I've thrown together a simple shoppng cart and basket, but I
occasionally get a type mismatch error on the basket. For example:
Microsoft VBScript runtime error '800a000d'
Type mismatch: '[string: "2.501.00"]'
There doesn't seem to be any pattern to it and I can't figure it out
at all, I was hoping someone could help!
My code:
<%
dim customerid
dim price
dim shipping
dim grandtotal
grandtotal = 0
shipping = 0
price = 0
customerid = session("id")
if customerid = "" THEN
Response.write "Your basket is empty"
Response.write "<br>"
Else
Set conn = Server.CreateObject("ADODB.Connection")
connStr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &
Server.MapPath("data/data.mdb")
Conn.Open connStr
Set Session("myConn") = conn
strSQLQuery = "SELECT * FROM basket WHERE Customerid = '" & customerid
& "'"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strSQLQuery, conn, 3, 3
do until rs.eof
price = 0
price = rs("price") + rs("shipping")
price = price * rs("qty")
%>
<tr>
<td width="47%""><%=rs("title1")%>
</td>
<td width="11%"><%=rs("Qty")%>
</td>
<td width="8%">£<%=rs("price")%> </td>
</tr>
<%
grandtotal = grandtotal + total
shipping = shipping + rs("shipping")
rs.movenext
loop
rs.Filter = 0
conn.close
Set conn = Nothing
grandtotal = round(grandtotal,2)
%>
Many thanks!
Tom Tag: crm Tag: 292453
ASP Hyperlink problem with FP2003
I've got a Database Results Wizard form with a hyperlink which passes data
onto the next page. I wish to send two pieces of data along this link. The
first item is from within the DRW data, so I can easily set this up using
hyperlink parameters. However the second piece of data is not within the
DRW, so when I use the hyperlink parameters it doesn't allow me to use it
because it is not in the Name dropdown when I use Add in the hyperlink
parameters dialog.
Anyone know how I can achieve this?
Ray Tag: crm Tag: 292452
asp, mysql and myodbc driver
hi
I want to install mysql odbc driver 3.51 and downloaded
MyODBC-3.51.06-dll.zip from the mysql.com.
but when i unzipped it, it shows only dll file..
I m very confused how to install odbc driver? would i
need to install whole mysql as well or i can just install
myodbc driver? I just wanted to create DSN to remote
server..
I'm using windows xp
Any help would be appreciated..
thanx...
dave Tag: crm Tag: 292450
why adodb.strem downloding works for everything but self extracting files?
hi,
Can anyone tell me what the problem is and how to solve it
The following piece of code resides on an asp page on the server and
is used to download files from the server to the machine accessing the
abobe mentioned asp page. It WORKS for every type of file when I
change the content type according to the file type, but it won't work
with self extracting files. When an end user downloads a self
extracting file by accessing the code, the whole file is downloaded on
its entire size, but trying to run the self extracting file by double
clicking on it yields a momentary DOS-like black screen and not what
is expected -- that the file start running by unzipping itslef and
then executing some setup or install file. Further more, as something
that migh give the experts of you a hint, even though the file is
downloaded on all its bytes, the icon associated with the file on the
server DOES NOT appear with the downloaded file.
Response.ContentType ="Application/exe"
Response.AddHeader "Content-Disposition:","attachment;filename=myselfextrct.exe"
Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Open
objStream.Type = 1
objStream.LoadFromFile "c:\myselfextrct.exe"
Response.BinaryWrite objStream.Read()
objStream.Close
set objStream = Nothing
Set objFile = Nothing
thanks
Avi Tag: crm Tag: 292445
IsNumeric problem....
Anyone have any why the following, returns true?
'// Leave everything after the ?
strTemp = StripQStr("/?DD0898SDFSDFSD89Q2ASD8822")
If IsNumeric(StrTemp) Then
Response.Write strTemp & " is numeric"
else
Response.Write strTemp & " is not numeric"
end if
'// Function to strip everything upto and including the "?"
'// and return only the string after it.
Function StripQStr(strVal)
Dim path
path = Split(strVal, "?")
StripQStr = path(UBound(path))
End Function
--
Regards
Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk
Keeping it FREE! Tag: crm Tag: 292434
request object and server .transfer
is there a way to clear out the request.form collection, or the entire
request object, for that matter??
im using server.transfer and this can be troublesome in cases where you need
the request.form items to be reset.
tia
jt Tag: crm Tag: 292430
modifying code-need some help
I am modifying someone else's code and need help with an array:
Can someone explain to me what this is doing?
PedArray = Split(T_ped,CHR(13))
I know this is creating an array and splitting the t_ped text at the
CHR(13).
What is this next step?
Sire_1 = Trim(mid(PedArray(5),21,52-21))
Is that "Look at the 5th split", starting at character 21? What is the
52-21?
If t_ped =*Nasrullah 40 Bold Ruler 54 Boldnesian 63 Miss Disco 44 Polynesian
42 Alanesian 54 Bold Reasoning Alablue 45 (1968) *Turn-To 51 Hail To Reason
58
Sire 1 is being displayed as Alanesian5
IS that correct?
--
Joey Martin, President
Infosmiths
www.infosmiths.net
502-633-3428 Tag: crm Tag: 292424
ASP, SQL books
Being a beginner at ASP and SQL Im constantly looking for new resources
of information that I will be able to learn from, what are some of the
good books/websites that you guys use?
So far I have:
1)SAMS Teach Yourself SQL in 21 days
2)ASP Programmer for the absolute programmer
3)Dreamweaver MX 2004 with asp, coldfucion and php
training from the source
4)Designing with Web Standards
5)Beginning Active Server Pages 3.0 (wrox)
I think all of these are great books (except for 2, it's to basic); are
there any books that you thought were great/useful?
-=Ben
-=To email me take out the joke.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it! Tag: crm Tag: 292423
HELP! Trying to use ASP on my local machine.
I'm not a networking/IT guy, but I was put in charge of figuring out
how to use ASP to tap into an Oracle db for my office. I am using a
windows 2000 laptop, and I want to be able to run ASP code on my local
desktop (without being plugged into a network).
I need a lot of help here. I know I have to turn my computer into a
webserver, but I'm not certain what I need to do with the IIS. What
do I need to do in general to make my computer a webserver? In
addition, I will be using a local Oracle database. So I wasn't sure
what I would need to do to make that db available for querying with
ASP. What is the best way to make that connection?
Anyone who can point me to useful documentation would be much
appreciated.
Thanks! Tag: crm Tag: 292419
How to add click function to a dynamically created Button in WebForm
I am trying to create a bookstore WebApplication using c#. I can
display the books (obtained from sql server) on a table in a WebForm.
At the end of each row, I would like to add "add to cart" button.
Therefore, I use
Button bt_add = new Button();
bt_add.Text = "Add to cart";
and put it in a cell which is later placed in each table row. The
Buttons display fine on the WebForm. However, I don't know how to add
the Button_Click function for each of the Button I created since I don't
know the total number of books in advance. Can anyone help me get "add
to cart" button to work?
Note: I try clicking on each Button, the WebForm page loads back to its
original stage (Page_Load function) and my search result is gone.
Thanks, Tag: crm Tag: 292417
Revisiting an old friend: Set oRS = Nothing
Last September, some of us engaged in a discussion of freeing resources in
ASP scripts written in JScript. It can be seen here:
http://tinyurl.com/2flzt
I recently read Eric Lippert's article on the use of *Nothing* assignments
in VB (http://blogs.msdn.com/ericlippert/archive/2004/04/28/122259.aspx)
right before going out of scope, and was shocked by what he had to say, and
I must say it has me curious about the implications for ASP, whether written
in JScript or VBScript.
Like Lippert, I have seen a lot of documentation/advice that suggests a need
for such assignments, but little empirical evidence that it matters. I do
not mean to suggest that *Nothing* assignments are NEVER required, I simply
wonder if anyone has bothered to check if it still matters with recent
generations of IIS and such common tools as ADO or CDO.
Comments?
--
Dave Anderson
Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting. Tag: crm Tag: 292415
Do While not Statement
I have two 'Do While Not' statements, that are getting information from
the same recordset. If I comment out the first one I can get the results
for the second one, and vice-versa. Why is this happening? Is it because
it's already at the EOF? If so how do I get it back to the BOF for the
2nd 'Do While Not' statement?
'----------------------------------------
'Create an ADO recordset object
Set rs_Report = Server.CreateObject("ADODB.Recordset")
'Initialise the strSQL variable with an SQL statement to query the
database
strSQL = "SELECT gender, referral, youthmember, age FROM tblUsers WHERE
base = '" + Replace(chosenBase, "'", "''") + "'"
'Open the recordset with the SQL query
rs_Report.Open strSQL, adoCon
'-----Gets the total number of male and female users
intMale = 0
intFemale = 0
Do While NOT rs_Report.EOF
If rs_Report("gender") = "male" then
intMale = intMale + 1
Else
intFemale = intFemale + 1
End If
rs_Report.MoveNext()
Loop
'-----Figures out how they heard about the program
Do While NOT rs_Report.EOF
If rs_Report("referral") = "Base Paper" then
intBasePaper = intBasePaper + 1
End IF
rs_Report.MoveNext()
Loop
----------------------------------------------
--Sample Output--
Male = 11
Female = 4
Base Paper =__ "nothing is returned here"
----------------------------------------------
Like I said before If I comment out the first do while not statement I
can get the answers for the second one. If I don't it doesn't even get
inside of the second do while not statement.
I know I can fix it by just having a seperate SQL statement to the
database and get my information seperately, but it seems like a waste of
time. Thanks for any help.
-=Ben
-=To email me take out the joke.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it! Tag: crm Tag: 292407
Trouble with Request.Form Plus Upload
I have a form that passes variables to an asp file and then uploads a file.
For some reason the request.form is not getting the info from the form.
It's returning blanks. Any insight would be appreciated....
Here is the asp file
<HTML>
<HEAD>
<TITLE>File Upload Results</TITLE>
<BODY>
<font color=#000000><b>Files Uploaded Status:</b></font><br><br>
<%
Set Upload = server.createObject("Chili.Upload.1")
Upload.AllowOverwrite = True ' Generate unique names
'Upload.SizeLimit = 150000 ' Truncate files above 50KB
On Error Resume Next
MyArray = Split(Upload.SourceFileName, "\")
FName = MyArray(UBound(MyArray))
If Upload.SourceFileExtension = ".pdf" or Upload.SourceFileExtension =
".zip" Then
If Upload.FileSize< 3000000 Then
UpldAllowed=True
Else
UpldAllowed=False
End If
Else
UpldAllowed=False
End If
If Upload.SourceFileExtension = ".gif" or Upload.SourceFileExtension or
".jpg" or Upload.SourceFileExtension or ".png" Then
If Upload.FileSize< 150000 Then
UpldAllowed=True
Else
UpldAllowed=False
End If
Else
UpldAllowed=False
End If
If UpldAllowed=False Then
Response.Write "<font color=red><b>Your file is either of an disallowed
type or is too large. Please <a href=upload.asp>try
again</a></b></font><br>"
Else
Upload.SaveToFile(Server.mapPath("/") & "/" & "/iparttest/upload/" & FName)
Response.Write "<font color=#000000><b>File: </b></font>" &
Upload.SourceFileName & " <font color=#009900><b>--Size:" & Upload.FileSize
&" Bytes -- </b></font> <a target=_blank
href=http://www.sdotson.com/iparttest/upload/" & FName & ">Click to
Test</a><br>"
Response.Write "<br>Copy and paste the following to use your image/file in
the forum:<br><br>"
If Upload.SourceFileExtension = ".pdf" or Upload.SourceFileExtension =
".zip" then
Response.Write "<b><font
color=red>http://www.sdotson.com/iparttest/upload/" & FName & "</b></font>"
Else
Response.Write "<b><font
color=red>[img]http://www.sdotson.com/iparttest/upload/" & FName &
"[/img]</b></font>"
End If
End If
Upload.Close
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open
"driver={MySQL};server=localhost;database=username","username","password"
response.write "stuff"
response.write "Description="
response.write (request.form("description"))
set the variables
strImageURL = ""
strFilename = FName
strDescription = request.form("description")
strAuthor = request.form("author")
strCategory = request.form("category")
strIsVerified = "False"
strUpdateDate = Date
sql = "INSERT INTO iparts
(imageurl,filename,description,author,category,isverified,updatedate) VALUES
('" & strImageURL & "','" & strFilename & "','" & strDescription & "','" &
strAuthor & "','" & strCategory & "','" & strIsVerified & "','" &
strUpdateDate & "')"
Conn.Execute(sql)
Conn.Close
%>
</BODY>
</HTML>
_____________________________________________
and here is the form:
<html>
<FORM METHOD="POST" ENCTYPE="multipart/form-data" ACTION="addnewipart.asp">
<table border="0">
<tr>
<td>iPart to Upload:</td>
<td><INPUT TYPE="FILE" NAME="FILE1"></td>
</tr>
<tr>
<td>Your Name:</td>
<td><input type="text" name="author" size="50"></td>
</tr>
<tr>
<td>Description:</td>
<td><input type="text" name="description" size="50"></td>
</tr>
<tr>
<td>Select a Category - <a href="categoryhelp.html">Help</a></td>
<td> <SELECT NAME="category">
<OPTION value="hydraulics">Hydraulics
<OPTION value="pneumatics">Pneumatics
<OPTION value="fasteners">Fasteners
<OPTION value="hardware">Hardware
<OPTION value="powertransmission">Power Transmission
<OPTION value="fasteners">Fasteners
<OPTION value="fasteners">Fasteners
</SELECT>
</td>
</tr>
<tr>
<td></td>
<td><input type="submit" name="submit" value="Upload iPart"></td>
</tr>
</table>
</form>
</html>
--
Sean Dotson, PE
Autodesk Inventor Certified Expert
http://www.sdotson.com
http://www.sdotson.com/forums/
Check the Inventor FAQ for most common questions
www.sdotson.com/faq.html
----------------------------------------------------------------------- Tag: crm Tag: 292405
Help - Authentication with ASP
I had to transfer an ASP Web Application (developed by another person) to a
different web server. It seems to work but not completely.
I have some problems with authentication: it is based on a username and a
password stored in a SQL Server's table. These data are requested via basic
authentication (not a IIS level but I think it is used to create the
authentication window in which put username and password). The problem is
that it doesn't accept username and password and, after three times, it
redirect me to a page telling "You don't have rights to see this page". What
could I do?
Thanks a lot
Lorenzo
Here's the code:
<%
Dim attivo
attivo = 0
SET UUEncode = Server.CreateObject( "Scripting.Dictionary" )
FOR i=0 TO 63
SELECT CASE i
CASE 0 offset = 65
CASE 26 offset = 71
CASE 52 offset = -4
END SELECT
UUEncode( CHR( i + offset) ) = i
NEXT
Function Decode ( TheString )
For byteGroup = 1 To Len( theString ) Step 4
numBytes = 3
groupBytes = 0
For CharCounter = 0 to 3
thisChar = Mid( theString, byteGroup + CharCounter, 1)
If thisChar = "=" Then
numBytes = numBytes - 1
thisByte = 0
Else
thisByte = UUEncode( thisChar )
End If
groupBytes = 64 * groupBytes + thisByte
Next
For k = 1 To numBytes
Select Case k
CASE 1: thisChar = groupBytes \ 65536
CASE 2: thisChar = (groupBytes And 65535) \ 256
CASE 3: thisChar = (groupBytes And 255)
End Select
Decode = Decode & Chr( thisChar )
Next
Next
End Function
auth = TRIM(Request.ServerVariables("HTTP_AUTHORIZATION"))
IF auth = "" THEN
Response.Status = "401 Not Authorized"
Response.AddHeader "WWW-Authenticate", "Basic realm=""localhost"""
Response.End
END IF
auth = TRIM( MID( auth, 6) )
auth = Decode( auth )
authSplit = SPLIT( auth, ":" )
username = authSplit( 0 )
password = authSplit( 1 )
Set objConn=Server.CreateObject("ADODB.Connection")
objConn.ConnectionString=CONNECTION
objConn.Open
sqlString = "SELECT username, password, codice_utente FROM " & user
&"a_dati_utente WHERE username ='" & username & "' AND password='" &
password & "'"
Set RS = Server.CreateObject("ADODB.Recordset")
RS.Open sqlString, objConn
IF RS.EOF THEN
Response.Status = "401 Not Authorized"
Response.AddHeader "WWW-Authenticate", "Basic realm=""localhost"""
RS.Close
Set RS = Nothing
objConn.Close
Set objConn = Nothing
Response.End
END IF
dim id_utente, id_periodico, id_numero, scaricato, codice_utente,
checkLogin, us, pwd
checkLogin = False
us = TRIM(RS("username"))
psw = TRIM(RS("password"))
if (username=us And password=psw) then
checkLogin = True
End If
If (checkLogin = False) Then
Response.Status = "401 Not Authorized" 'nessun record trovato
Response.AddHeader "WWW-Authenticate", "Basic realm=""localhost"""
RS.Close
Set RS = Nothing
objConn.Close
Set objConn = Nothing
Response.End
End If
codice_utente = rs("codice_utente")
RS.Close
Set RS = Nothing
objConn.Close
Set objConn = Nothing
%> Tag: crm Tag: 292401
CDONTS HTML mails with images
Hi everyone,
I got a little problem while sending HTML e-mails with CDONTS.
I generate my e-mail body without problems into a string variable. When I
display it to the browser via a "response.write", it's OK, including images.
Then I set this string variable to the CDONTS.Newmail object (body
property), and I send the mail.
The format settings are the following :
MyCDONTSMail.BodyFormat=0
MyCDONTSMail.MailFormat=0
when I revcieve the mail, I have comments (<!----------------------------->)
instead of image tags...
does anybody know where it could come from ? A CDONTS parameter ? a server
setting ? A firewall issue ?
Thanks for your help,
Yan. Tag: crm Tag: 292398
do while loop during ADODB connection
Hi,
I am writing a script to send customers an email copy of their
shopping cart recipt. While creating the variable "mailbody" which
will be plugged into my CDO.htmlbody, I need to gather some
information about their order. The script does a "Do while not
rs.eof" and assigns each rs(field) to a variable, which is then added
to the mailbody variable. Unfortunately, when i ask for the mailbody
variable later, I lose all of the information added to the variable
during my loop. I've tried everything I can think of to correct this
so I was hoping somebody out there would have some ideas. Is there a
better way of doing this? Script is included below.
Thanks,
Perry
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mailbody = mailbody & "</tr>"
'$$$$$
'<problem area>
'$$$$$
If Not rs.EOF Then
rs.MoveFirst
rs.PageSize = NrPerPage
TotalPages = rs.PageCount
rs.AbsolutePage = CurrentPage
trow="#FCFBFF"
Do while not rs.eof and Count1 < rs.PageSize
emorderno=rs("orderno")
emcustomer=rs("customer")
emadate=rs("adate")
empartno=rs("code")
emqty=rs("qty")
emshipcode=rs("shipcode")
emusername=rs("username")
emdescr=rs("description")
if len(emdescr)>30 Then
emdescr=Left(emdescr,30) & "..."
end if
mailbody = mailbody & "<tr><td bgcolor='" & trow & "'><img border='0'
alt='" & txt & "' src='http://www.rubber-seal.com/cart3/img/" &
emstatus & ".gif'></td>"
mailbody = mailbody & "<tr><td></td></tr><td bgcolor=" & trow& ">" &
emcode
mailbody = mailbody & "<font color='#6699FF' title='" &emcomment& "'
size='1'>"
mailbody = mailbody & " " & left(comment,50) & "</font></td>"
mailbody = mailbody & "<td bgcolor=" &trow& " align='center'>" &emqty&
"</td>"
count1=count1+1
if trow="#FCFBFF" Then
trow="#FFFFFF"
Else
trow="#FCFBFF"
End if
rs.movenext
loop
end if
rs.close
'$$$$$
'</problem area>
'$$$$$ Tag: crm Tag: 292392
ASP TimeOut
Hi!
I'm using the following server:
IIS5 Windows 2000 SP4 2 Processor Hyper thread enabled.
When creating HTML files with FileSystemObject the ASP page often times out
(not every time though) and gives this error:
"The maximum amount of time for a script to execute was exceeded. You can
change this limit by specifying a new value for the property
Server.ScriptTimeout or by changing the value in the IIS administration
tools"
There are no loops on the ASP page. When IIS is restarted the problem
disappears for a few hours then starts again.
Can anyone help please?
Thank you.
Jenny Tag: crm Tag: 292389
nested ifs and end ifs and elses
still working on this DB :o(
I have..
a query that I run, if this query is unsuccessful then another query is run
on another table, it goes something like this
if rs1.EOF then '1st query returns nothing
response.write "nothing in this table"
'so check the other table
strSQL = "SELECT * blah blah
rs.Open strSQL, Conn, 1
if rs.EOF then '2nd query also returns nothing
response.write "nothing in this table either"
else
do while not rs.EOF
reg = rs("reg_num")
l_read = rs("last_read")
response.write blah blah
end if
else
do while not rs1.EOF
strname = rs1("user_name")
response.write blah blah
rs1.movenext
loop
end if
but I get an expected statement (end if) error
I'm looking at my code it it seems to conform to the correct structure
if condition1 then
code block1
if condition2 then
codeblock2
else
codeblock3
end if
else
codeblock4
end if
should I perhaps have used elseif?? Tag: crm Tag: 292383
ASP file in InterDev can't "Start" as VBP file in VisualBasic?
so how I can test asp code as I test VB project?
the function such as "start","step into",etc. all can't use when I
edit asp file, InterDev can't "Start" asp file?
the IE give me such a simple error report:
error type:
Microsoft VBScript ÔËÐÐʱ´íÎó (0x800A01C2)
/FindMerchant/search.asp,Line19
the line 19 is: rsResult=search(strKeyword)
<%
Set conn = Server.CreateObject("ADODB.Connection")
conn.open strPath
dim rsResult
set rsResult = Server.Createobject("ADODB.recordset")
rsResult=search(strKeyword)
%>
<%
Function Search(keyword) 'keywordÀïµÄ¹Ø¼ü×ÖÓÿոñ·Ö¿ª
Dim sqlQuest
Dim keywordGroup
dim rs
set rs= server.createobject("ADODB.Recordset")
keywordGroup = Split(keyword)
'°ÑkeywordÀïµÄ¹Ø¼ü×ÖÒÔ¿Õ¸ñ×ö·Ö¸î·û×°µ½Êý×éÀï,
keyword = "" '×¼±¸ÓÃÀ´×°¾´¦ÀíºóµÄkeyword
Dim i
For i = 0 To UBound(keywordGroup)
'¸øÃ¿¸ö¹Ø¼ü×Ö¼ÓÉÏÌØÊâ·ûºÅÐγÉSQLÓï·¨
keywordGroup(i) = "'%" & keywordGroup(i) & "%'"
Next
For i = 0 To UBound(keywordGroup) '×éºÏ¾´¦ÀíºóµÄ¹Ø¼ü×Ö
If keyword = "" Then
keyword = keywordGroup(i)
Else
keyword = keywordGroup(i) & "and" & keyword
End If
Next
sqlQuest = "Select Tel,Address From tableMerchant Where
Commodity LIKE " & keyword
rs.Open sqlQuest, conn
Dim a
Do While Not rs.EOF
a = a & rs.Fields.Item("Tel") & rs.Fields.Item("Address") &
";"
rs.MoveNext
Loop
rs.Close
Search =rs
conn.Close
End Function
%>
I'm sorry my english is so poor,
so forgive me if my word had make you uncomfortable.
I'll try my best to express my question correctly Tag: crm Tag: 292382
ASP on Linux
Hi
Is it possible to host ASP (not .net) to host on Linux,( hopefully yes then
whats required extra on Linux).
If some one know any issues related to that or any reference site hosting
ASP on linux please advise.
Kind Regards
Fayyaz Tag: crm Tag: 292381
IIS5.1: 404 error when ASP page is called
Having previously had this working on my XP machine, I've come back after a
month to find this error occuring now.
In the meantime, I had installed PHP (v4.2.3) which could easily be a
factor.
The symptoms are that when I call an ASP page, I get a standard 404 error.
However, if I dont specify a page, and a default/index page is found, it
renders the page OK.
I've uninstalled PHP & rebooted, but this didnt work.
Any ideas?
Thanks
Chris Tag: crm Tag: 292380
Calculate the difference between entries in recordset..
Hi NG,
How do i calculate the difference in a recordset ?
Here's what i have now...
A large SQL query with a lot of joins and this : (the tables i use have a
lot of data)
<%
DO WHILE NOT rs.EOF OR rs.BOF
Response.write "<tr>"
Response.write "<td width=""167"">" & rs("WXS001") & " </span></td>"
Response.write "<td width=""234"">" & rs("WXS004") & " </span></td>"
Response.write "<td width=""100"">" & rs("XJS004") & " </span></td>"
Response.write "<td width=""167"">" & rs("XJS005") & " </span></td>"
Response.write "<td width=""167"">" & rs("XHS003") & " </span></td>"
Response.write "</tr>"
rs.MoveNext
LOOP
Else
rs.Close
Response.write "</table>"
myConn.Close
set myConn=nothing
end if
%>
I want to find the difference between 0 and rs("XJS005") and then the first
rs("XJS005") and the second, then between the second and the third.. To have
the interval between them...
I hope you understand my point, how do i accomplish this.
Regards
Kenneth Johansen Tag: crm Tag: 292379
IIS 5.1 local host error 500.100
Installing IIS and getting a strange error.
. Error Type:
Active Server Pages, ASP 0134 (0x80004005)
The object has an invalid ProgID of 'MSWC.MyInfo'.
//global.asa, line 1
This error comes after on Page not Found error after
entering http://localhost
I have done all the localhost not found suggestions in
the localhost not found thread. I also looked up the
error in the knowledge base and the Anonymous login was
not checked for the localstart.asp file.
I also ping 127.0.0.1 just fine.
Suggestions. Tag: crm Tag: 292378
hey everybody.
I need some help with developing integrated applications with ms-crm.
please reply ....
Do you mean you're looking to hire a consultant? If not, perhaps people can
help if you explain exactly what thing you're stuck on?
Ray at work
"Ron" <shimron76@bezeqint.net> wrote in message
news:409bdbe0$1@news.bezeqint.net...
> hey everybody.
>
> I need some help with developing integrated applications with ms-crm.
> please reply ....
>
> thanks
> Ron
>
>
"Ron" <shimron76@bezeqint.net> wrote in message
news:409bdbe0$1@news.bezeqint.net...
> hey everybody.
>
> I need some help with developing integrated applications with ms-crm.
> please reply ....
>
> thanks
> Ron
>
>