cancer10 47 Posting Whiz in Training

I am trying to send an email using CDOSYS with classic ASP. But I am getting this error:

CDO.Message.1 error '80040220'

The "SendUsing" configuration value is invalid.

/send.asp, line 8

line1     <%
line2     Dim myMail
line3     Set myMail=CreateObject("CDO.Message")
line4     myMail.Subject="Sending email with CDO"
line5     myMail.From="from@domain.com"
line6     myMail.To="to@domain.com"
line7     myMail.TextBody="This is a message."
line8     myMail.Send
line9     set myMail=nothing
line10    %>

Can anyone plz help?

Thanx

cancer10 47 Posting Whiz in Training

For windows users - Can someone create a folder anywhere on your PC and name it CON ? :D

cancer10 47 Posting Whiz in Training

This is the code got, it works fine if I place a textbox instead of teh second drop-down.

main.asp file

<script type="text/javascript">
<!--
function myfunction()
{
var xmlhttp = false;
//Check if we are using IE.
try {
//If the Javascript version is greater than 5.
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
alert ("You are using Microsoft Internet Explorer.");
} catch (e) {
//If not, then use the older active x object.
try {
//If we are using Internet Explorer.
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
alert ("You are using Microsoft Internet Explorer");
} catch (E) {
//Else we must be using a non-IE browser.
xmlhttp = false;
}
}
//If we are using a non-IE browser, create a javascript instance of the object.
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
xmlhttp = new XMLHttpRequest();
}
abc = document.getElementById('txtname').value;
var obj = document.getElementById('txtshouvik');
xmlhttp.open("GET", "execute.asp?str="+  abc);
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
obj.value = xmlhttp.responseText;
}
}
xmlhttp.send(null);
}
//-->
</script>
<select name="txtCity" id="txtCity" onchange="javascript:myfunction();">
				<%
				set rsCity = conn.execute("SELECT DISTINCT Venue_City from PRS_Master_Venue")
				do until rsCity.eof
				%>
				<option onclick="javascript:myfunction();"><%=rsCity("Venue_City")%></option>
		
				<%
				rsCity.movenext
				loop
				%>
                </select>
				
<select name="txtCity" id="txtCity" onchange="javascript:myfunction();">
<option onclick="javascript:myfunction();"><%=rsCity("Venue_City")%></option>
</select>
<input name="btn" type="button" value="click" onClick="javascript:myfunction();"/>

execute.asp file

<%
response.Write "Venue Name here..."
%>
cancer10 47 Posting Whiz in Training

Question - ASP + Ajax

Hey!

Not sure if this is the correct section to post this. ;)

Well, I have a table in my sql server 2000 database

***************
tblAddress
----------------------------
City_Name (varchar)
Venue_Name (varchar)
*******************

The "City_Name" column contains all the name of the cities in my country and each city has multiple venues.

Now I have 2 drop-down boxes in my asp page. The first drop-down is already listed with all the cities which are in the "City_Name" column.

What I now want is, when I select a city name from the first drop-down, the second drop down should be populated with all the venue names of that city (of course without refreshing the page)

I know this can be done with ajax.

I got few codes while googling but none of them are working :(

cancer10 47 Posting Whiz in Training

PHP - Converting IP to Country

Hello,

Is there any function/pre-made scripts in php which can tell me the name of country based on IP?


For example: If I supply an IP 132.162.138.139 then the script would echo "India"

Thanx in advance :)

cancer10 47 Posting Whiz in Training

Search for a string in a variable---

Is there a way to find a particular string in php.

For example:

I want php to echo "Found" if the word "sports" in found in this url http://yahoo.com/sports/soccer/index.html

if not then it should echo "bad Luck"


Is there any pre-defined function for this in php?


Thanx

cancer10 47 Posting Whiz in Training

ok, see the code below

<?
$rsQry = mysql_query ("select * from tblCustomer");
$arrQry  = mysql_fetch_row($rsQry);
?>

Now if I try to fetch a Customer's Name from the "Customer_Name" column from the "tblCustomer" table with the following code then I dont get anything:

<?
echo $arrQry["Customer_Name"];
?>

Why?


PS: I have tried this way and it works:

<?
echo $arrQry[0];
?>

But I want to use the column name instead of the column number. Any idea?

Thanx

cancer10 47 Posting Whiz in Training

Triggering -

Hello,

Need help :)

Herez the scenario:

I am maintaining a list of members of my site in a database. All members have an expiry date column in a table which is in mm/dd/yyyy format. I want that every members should be emailed on the day of their expiry automatically. I dnt wanna search for members and then mail then manually or if I m out on vacation it should do the work for me.

I have heard this can be done using triggers, but not sure how to use it.

Can u help me? also is there any other way apart from using triggers?


PS: Corn Jobs are not enabled in my webhost just in case if you are going to suggest me that. :)

Thanx in advance.

cancer10 47 Posting Whiz in Training

Javascript Page Preloader-

Can someone tell me the code for making a Page Pre-loader. The background should be disabled when the pre-loader is prompted.

The best example I can give you is the plesk control panel interface as seen in the screenshot below. Notice the background is disabled while the page is loading...

[img]http://ezfiles.info/images/92105103.jpg[/img]

cancer10 47 Posting Whiz in Training
Ancient Dragon commented: great palet comparisons -- thanks for posting +14
~s.o.s~ commented: Good one.. ;-) +19
cancer10 47 Posting Whiz in Training

Hi All,

I have a question and I hope you guys can help me out.

If you have worked with php-mysql, you might have noticed that there is a featured to encrypt a password while inserting it in the database using the password() function.

I am looking for a similar feature as i am working with asp as frontend and mysql and ms sql server as my backend.

If you have not used php-mysql then ignore the above and tell me if there is any function to encrypt the password while inserting it to the database using ASP? (for both mysql and mssql)


Thanx in advance

cancer10 47 Posting Whiz in Training

That doesnt work. I have already tried that

cancer10 47 Posting Whiz in Training

I was wondering how do we make a folded page effect using photoshop as shown in the screenshot below

[img]http://ezfiles.info/images/5844116.png[/img]

cancer10 47 Posting Whiz in Training

Hey!

I came up with the new problem. I want to fetch all form values by using request.form("FormName") which is generated by javascript on runtime.

The attached zip code contains the working code of javascript creating dynamic form elements. So after generating a couple of textboxes when I click on the "Submit" button it should display all the values entered in the textboxes on the next page.

Herez a working example of that javascript: http://www.quirksmode.org/dom/domform.html

Is this Possible?


Thanx

cancer10 47 Posting Whiz in Training

Hi All,

I came up with a new issue/question.

I have seen in many sites that when I enter my username/password, it displays a new page wherein it says "Verifying Username/Password. Please wait..."


I wonder what does it do behind the scene? Does it really take 5-6 seconds to verify a username/password? if yes, what code runs behind it? If no, then why they have to display that page?

I think the authentication process normally does not take more than 1 second.


What do u say about this?


Thanx

cancer10 47 Posting Whiz in Training

Weird ASP/SQL Problem


Consider the following HTML Form, it has a textbox and a search button.

<form method=post action="search.asp">
<input name="txtName" type="text" id="txtEmail" />
<input type="submit" name="Submit3" value="Search" />
</form>

The search.asp page:

select * from tbl_group_contact where userName ='"& request("txtName") &"'

if I put this query in the search.asp page then it will search by name based on the name I entered in the textbox. But if I leave the textbox empty and click on the search button, SQL fetches all the rows from the table. If you havent noticed this before, try it now!!


Well, this is not my problem/question. my question is if I place a combo box instead of the textbox and assign a NULL value to one of the option field like:

<select name="txtType" id="txtType">
<option value="" selected="selected">All</option>
</select>

and press the search button, then it does not fetch all the rows as it did for the empty textbox.

Any idea why?

cancer10 47 Posting Whiz in Training

Hi,

I have not yet received a satisfying reply so far :(

Ok lets tweak this a lil bit.

we can have a percentage based ad management system.

Like I have 3 banners in my database.

Banner A - To receive 50% Views
Banner B - To receive 30% Views
Banner C - To receive 20% Views

So suppose I refresh the page 10 times, I should get the following views of my banners

Banner A - 5 views
Banner B - 3 views
Banner C - 2 Views

Can u guys help me with this?


Thanx in advance

cancer10 47 Posting Whiz in Training

Hi,

I am designing a small advertisement management program in asp, and Sql Server 2000 as database.

My table has the following fields which are pretty self explanatory:


bannerId, bannertitle, bannerurl, imageURL, bannerpirority

bannerId = Autoincrement to generate unique id for a banner ad
bannertitle = String title of the banner
bannerurl = URL where the image is linked
imageURL = URL of the image file
bannerpirority = pirority of the banner to be displayed (1 = lowest, 5 = highest)


Now, I want to display the banner on a page based on its pirority, like if there are 3 banners A, B, C which have the pirority 1,2,3 respectively so banner C should be displayed more times as compared to banner B. Banner B should be displayed more times then banner A


Hope you got me, its like the more pirority a banner gets, the more its being displayed.


I am using the following SQl Query but I dnt think its the proper logic, can u plz help me?

select top 1 * from tbl_banner_management order by newid(), bannerpirority desc

Thanx in advance for your help.

cancer10 47 Posting Whiz in Training

Have to be that way, just take e-bay (no advertising) what hell of database they have to run store all details about sellers, buyers and things for sale...

They use AS 400 database from IBM, which cost thousands of US dollars

cancer10 47 Posting Whiz in Training

Hi,

I am using CDONTs for sending email using ASP. I need to send a HTML form that takes values from a MS SQL Server database. How do I send this big code of form using ASP?

I am using the following code to send the email

<%
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From="mymail@mydomain.com"
myMail.To="someone@somedomain.com"
myMail.HTMLBody = "--FORM CODE HERE--" 
myMail.Send
set myMail=nothing
%>

The code for the form is as below

<form method="post" target="_blank" action="http://tulleeho.com/tastemaker/members-feedback.asp">
  <table width="70%" border="0" align="center" cellpadding="3" cellspacing="4" style="border:1px dotted #CCCCCC;">
    <tr>
      <td class="style1"><div align="right"><span class="style1">Name:</span></div></td>
      <td><input type="text" name="txtuserFirstName" value="<% =rs("userFirstName") %>"></td>
    </tr>
    <tr class="style1">
      <td colspan="2"><HR align="right" style="border:1px dotted #CCCCCC;"></td>
    </tr>
    <tr>
      <td class="style1"><div align="right">Age:</div></td>
      <td><input type="text" name="txtUserAge" value="<%= datediff("yyyy",year(date),rs("userdateofBirth")) %>"></td>
    </tr>
    <tr class="style1">
      <td colspan="2"><HR align="right" style="border:1px dotted #CCCCCC;"></td>
    </tr>
    <tr>
      <td class="style1"><div align="right">Sex:</div></td>
      <td><select name="txtuserSex">
        <option value="<% if rs("usersex") = "True" then 	response.Write "1"
	if rs("usersex") = "False" then	response.Write "0"%>"><% if rs("usersex") = "True" then 	response.Write "Male"
	if rs("usersex") = "False" then	response.Write "Female"%></option>
        <option value="<% if rs("usersex") = "True" then response.Write "0"
		if rs("usersex") = "False" then	response.Write "1"%>"><% if rs("usersex") = "True" then 	response.Write "Female"
	if rs("usersex") = "False" then	response.Write "Male"%></option>
      </select>    </td>
    </tr>
    <tr class="style1">
      <td colspan="2"><HR align="right" style="border:1px dotted #CCCCCC;"></td>
    </tr>
    <tr>
      <td class="style1"><div align="right">City:</div></td>
      <td><select name="txtUserCity">
        <option <% if rs("userCity") = "Bangalore" then response.Write "selected" %>>Bangalore</option>
        <option <% if rs("userCity") = "New Delhi" then response.Write "selected" %>>New Delhi</option>
        <option <% if rs("userCity") = "Mumbai" then response.Write "selected" %>>Mumbai</option>
        <option <% if …
cancer10 47 Posting Whiz in Training

Thanx mate

cancer10 47 Posting Whiz in Training

I meant how much each data (in GB or TB) can each of those database store

cancer10 47 Posting Whiz in Training
cancer10 47 Posting Whiz in Training

Hello,

I am using ASP and MS SQL Sever 2000 as backend database..

I am writing a SQL query which will pick up top 5 recipes details who have scored the highest marks from the following table

tblrecipes -

ID |  recipe_name | Total

The following points to be noted:

- The table has 500 records.
- 50 of them have achieved the highest marks ie 100 marks each
- My following query is picking up top 5 records who have scored 100 marks

SELECT TOP 5 ID, total, recipe_name
FROM tblrecipes 
ORDER BY total DESC

and getting this output:

[img]http://img2.freeimagehosting.net/uploads/3d14a5272a.jpg[/img]


Now my question is:

On what basis its showing up this sequence of listing? I mean why the ID 89 is on the top and 136 at the bottom? Why the ID is not the other way round?

Like the following?

ID
__
178
136
89
286
340


Can someone explain please?


Thanx

cancer10 47 Posting Whiz in Training

I was wondering what is the Database Storage Capacity for the following databases:

MySQL 5

Microsoft Sql Server 2005

MS Access 2003

Thanx

cancer10 47 Posting Whiz in Training

ok so how do i do that?

cancer10 47 Posting Whiz in Training

Actually I am trying to create a blog service where my visitors can create their own blogs which will host on my server. I want to give them their subdomain either as http://username.myserver.com or http://myserver.com/username

can u tell me an easy method of doing this. I actually dnt want to give out URL containing querystrings as their blog URL like http://myserver.com/index.asp?username=john

I want them to give out like http://myserver.com/username


Any ideas?

cancer10 47 Posting Whiz in Training

Hello,

Does anyone know how do I create a subdomain using ASP?

I run my own server so I have the full access to it (if that is needed for the same)


Thanx

cancer10 47 Posting Whiz in Training

Ok, I am into this trouble since a past couple of weeks, people are paying me by fraud credit cards and after a while paypal is hanging me with the "paypal chargebacks"

I want to know if there is really any way I can disable accepting credit cards on my paypal account?


If you can help in any other way to fight this fraud CC transaction, I will be greatful to you.


Thanx

cancer10 47 Posting Whiz in Training

Hello All,

I am using an ASP script on my site that reads a microsoft excel file and adds the values to the database (MS SQL Server). The script works completely fine on my LOCAL server, but it shows me the following error when I upload it to the server and try to run it.

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Excel Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x1128 Thread 0x2268 DBC 0xd2d0fec Excel'.

/Bacardi/bblcontest/readexcel.asp, line 5

FYI, I am using the following connection string:

Set oConn = Server.CreateObject("ADODB.connection") 
oConn.Open "Driver={Microsoft Excel Driver (*.xls)}; DriverId=790;" &_ 
"DBQ=" & Request.ServerVariables("APPL_PHYSICAL_PATH") & "upload-data\excel.xls;" &_ 
"DefaultDir = " &  Request.ServerVariables("APPL_PHYSICAL_PATH") & "upload-data\"
cancer10 47 Posting Whiz in Training

Hello,

I have a question:

Suppose I have a table named as tblfriends and there are 3 columns with several row. Column names are: name, email, phone

I want to pick 5 names randomly from the table each time my asp page refreshes.


How can this be coded in classic asp?

Thanx for your help

cancer10 47 Posting Whiz in Training

How do I convert 12/15/1985 to 15 December 1985 format using classic ASP?


Thanx in advance

cancer10 47 Posting Whiz in Training

In my whm, when I try to create a new account under "Account Functions" I get this error:

Unable to find an ip address

In the "Ip Address (only for new ip-based accounts)" combo box there are no IP address..

can someone please tell me how to add IPs in the combo box?

[IMG]http://i16.tinypic.com/3ywejxx.jpg[/IMG]

Thanx

cancer10 47 Posting Whiz in Training

Anyone knows how to determine an image's dimension using Classic ASP?

Like How do I know the width, Height of this image using ASP?

http://www.google.co.in/intl/en_com/images/logo_plain.png


Thanx

cancer10 47 Posting Whiz in Training

welcome

cancer10 47 Posting Whiz in Training

How come MS SQl Server 2000 does not have an autonumber datatype as like MS Access does?

Any alternative?

cancer10 47 Posting Whiz in Training

Hi,

I am trying to send the following HTML mail thru the ASP CDO component.

This is the HTML mail i wanna send from Page 1:

<div align="center">
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td><div align="center">
          <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="820" height="540">
            <param name="movie" value="http://mywebsite.com/movie1.swf">
            <param name="quality" value="high">
            <embed src="http://mywebsite.com/movie1.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="820" height="540"></embed></object>
        </div></td>
    </tr>
  </table>
</div>

This the the code of the second page which sends the mail.

<%
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From="mymail@mydomain.com"
myMail.To="someone@somedomain.com"
myMail.HTMLBody = request.form("txtmessage") 
myMail.Send
set myMail=nothing
%>

My mail contains absolute path of the the SWF file, but the problem is when I receive the mail (tested with Gmail, yahoomail etc) I get a blank email with absolutely nothing in it.

I have tested the mail with only HTML hyperlinks and it works but not with an embedd SWF file :(


Any idea how to make it work?


Thanx

cancer10 47 Posting Whiz in Training

Yes I am using Access and Jet

Any other solution?

cancer10 47 Posting Whiz in Training

I backup to an individual file

cancer10 47 Posting Whiz in Training

I searched my C:\ drive both by file name (that I provided while backing up) as well as *.bak but could not any such files. any idea?


PS: Backup was done successfully.

cancer10 47 Posting Whiz in Training

Thanx but it generates this error

Error Type:
Microsoft JET Database Engine (0x80040E14)
Syntax error. in query expression 'datepart (mm,convert(datetime,dob)) = (select datepart(mm,convert(datetime,getdate())))'

cancer10 47 Posting Whiz in Training

Any idea, wot extension they have?

cancer10 47 Posting Whiz in Training

Thanx,

One more question,

After I perform a backup, how do I burn the backup file in a CD? I mean I cannot see a file with the name I provided, its hidden or something?

Thanx

cancer10 47 Posting Whiz in Training

Hello,

I have the full version of norton ghost 10. I have made a backup. Now can someone plz guide me the process to restore the backup through command prompt i.e. when you boot your computer and boot in command prompt mode.


Thanx in advance

cancer10 47 Posting Whiz in Training

Hello,

I am developing a simple calender in my site which will display the next upcoming birthday of my member.

I have a table which has 2 column


cname | dob
-------------------
Joe | 9/12/1982
Mathew | 2/17/1997
Pat | 8/23/1880
-------------------

What SQL Query should I use to get the name of that person?

cancer10 47 Posting Whiz in Training

Does anyone know the exact query for IN in the following senario...

I want to search for 2 columns for 1 mobile number (mobile, alternate mobile)

I am using the following query

strSQL = "select * from tblcontest where bar_mob_no IN('" & sSQL &"') or bar_alt_mob in('" & sSQL &"')"

But its hshowing the following error

Microsoft JET Database Engine- Error '80040e14'

Syntax error (missing operator) in query expression 'bar_mob_no IN(''44444444'') or bar_alt_mob in(''44444444'')'.
cancer10 47 Posting Whiz in Training

Hello,

I was looking around for some tutorials about how to backup my database in my hard disk using SQL Server 2000 Enterprise Manager.

Can someone explain me in a friendly and step-by-step method? (screenshots preferred)

Thanx so much in advance

cancer10 47 Posting Whiz in Training

Hello,

Can someone make me an exe of this VB code?

http://www.pscode.com/vb/scripts/ShowCode.asp?txtCodeId=33626&lngWId=1

I am at office now and dnt have VB installed here...so just need ur help...

upload it to www.rapidshare.com


Thanx

cancer10 47 Posting Whiz in Training

How do I update multiple records in a table in ASP using loops ?

For example.

I have a table with the following colums

ID | Col1 | Col2
-------------------------
1 | 50 | 100
2 | 25 | 130
3 | 55 | 70


I want to add 66 and 77 into the ID # 1 and ID # 3 respectively. So the result should be


ID | Col1 | Col2
-------------------------
1 | 116 | 177
2 | 25 | 130
3 | 121 | 147


Note: All datatype of the colums are integer

cancer10 47 Posting Whiz in Training

Hello,

I am facing a problem in ASP. The scenario is...

I have a database with the following Colums and the data type of all Colums are integer

id|score1 | score2 | score3
------------------------------------
1 | 10 | 4 | 10 |
2 | 5 | 51 | 10 |
3 | 5 | 22 | 10 |
4 | 15 | 54 | 10 |
5 | 7 | 11 | 10 |
6 | 19 | 2 | 10 |
7 | 10 | 1 | 10 |
8 | 12 | 66 | 10 |
9 | 3 | 75 | 10 |
10| 7 | 11 | 10 |

Now, I have a page (search_result.asp) where I can search for scores based on the ids, and each result has a corresponding checkbox (so that I can increase the number of score of a particular ID or multiple IDs )

I have a second page (update_scrore.asp) where I have 3 textboxes where I can enter scores and at the click of a button these scores are added to the selected ID.


I can make it work perfectly fine when It comes to just one score update at a time. But I cannot figure out how to add the score if I am selecting multiple checkboxes i.e. multiple IDs.


For Eg. If I am selecting the checkbox containing the ID 8, and I want to add 30 scores in each 3 colums, the updated value will be 42 | 96 | 40

But I cannot figure out, how should I add and update the colums If I am selecting multiple IDs i.e. 7, 5, 9


I am new to ASP, so please help.


Thanx in Advance....


God Bless