|
Hi Friends,
Kindly help me for this. I wanted to export of excel data to table in sql server. I have to compare the column name in excel and table then export that column then next column. Like this i wanted this export.
Please help...
Thanks in Advance,
Regards,
|
|
|
|
|
' Path to excel file
z="uploadasp/contact_data.xls;"
Path = Server.MapPath(z)
SQL_Query = "SELECT * FROM [Commercial$]"
Driver ="{Microsoft Excel Driver (*.xls)}"
DataSource = "DBQ=" & Path & ";"
DataSource = DataSource & "DefaultDir=" & Path & ";"
DataSource = DataSource & "Driver=" & Driver & ";"
DataSource = DataSource & "FIL=excel 5.0;ReadOnly=1;"
Set MyConn =Server.CreateObject("ADODB.Connection")
MyConn.ConnectionTimeout = 15
MyConn.CommandTimeout = 30
MyConn.Open DataSource
'Set MyConn = Server.CreateObject("ADODB.Connection")
'Set MyConn = Server.CreateObject("ADODB.Recordset")
'strBaseFilePath ="uploadasp/contact_data.xls"
'MyConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
'"Data Source=" & Server.MapPath(strBaseFilePath) & ";" & _
'"Extended Properties=""Excel 8.0;"""
'RS.Open SQL_Query, MyConn, adOpenStatic
'Lets loop through the data and output it into a HTML table
Set RS = MyConn.Execute(SQL_Query)
IF RS.EOF THEN
'There is no data to show
tot=0
ELSE
'Lets output the field names
' FOR EACH Field IN RS.Fields
' NEXT
'Now we will output each row of the data
tot=0
tota=0
DO WHILE NOT RS.EOF
if rs.fields(0)<>"" then
Set rs4 = Server.CreateObject("ADODB.Recordset")
rs4.open "select * from data where 1<>1",Con,1,3
rs4.addnew
IF rs.Fields(0)<>"" THEN RS4("name")=rs.Fields(0)
IF rs.Fields(1)<>"" THEN RS4("surname")=rs.Fields(1)
IF rs.Fields(2)<>"" THEN RS4("primary_email")=rs.Fields(2)
rs4.UPDATE
end if
RS.MoveNext
LOOP
END IF
RS.Close
Set RS = nothing
MyConn.Close
Set MyConn = nothing
===================
Hope this code will help
|
|
|
|
|
Does anyone know a really good site that I could download a really good flash file?
THANKS!!!!
|
|
|
|
|
Are you cross posting??
You have a very similar question in JavaScript forum!
You want everything for nothing?
Heard of Google yet?
Dave
Find Me On: Web| Facebook| Twitter| LinkedIn
CPRepWatcher now available as Packaged Chrome Extension, visit my articles for link.
|
|
|
|
|
Just like to thank the univoter. it was a pleasure.
The original OP's question was so open ended, there is more chance of getting a sensible answer out of a politician. so i will gladly take the 1 vote.
Have a nice day.
Dave
Find Me On: Web| Facebook| Twitter| LinkedIn
CPRepWatcher now available as Packaged Chrome Extension, visit my articles for link.
|
|
|
|
|
i am new in web development my question is how to construct a side bar just like the one
at the left of this website that is when i click on web development it drops down and shows
the categories under web development please note i am using CSS HTML and PHP
|
|
|
|
|
I have developed a website. i had problem in viewing in Mozilla Firefox,Internet Explorer 8.0 and above.
How to over come with this problem
|
|
|
|
|
Since no one here is endowed with second sight or telepathy you'll need to tell us what the problem is (keep it brief and simple).
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
You can use different css file per browser but I don't think you want that. You may want to explain what 'problems' you have...
|
|
|
|
|
|
Hi, I am getting below error ,
---------------------------
Microsoft Development Environment
---------------------------
Error while trying to run project: Unable to start debugging on the web server. Server side-error occurred on sending debug HTTP request.
Make sure the server is operating correctly. Verify there are no syntax errors in web.config by doing a Debug.Start Without Debugging. You may also want to refer to the ASP.NET and ATL Server debugging topic in the online documentation.
Please hellp
- Ajay K
|
|
|
|
|
Hi, I am getting below error ,
---------------------------
Microsoft Development Environment
---------------------------
Error while trying to run project: Unable to start debugging on the web server. Server side-error occurred on sending debug HTTP request.
Make sure the server is operating correctly. Verify there are no syntax errors in web.config by doing a Debug.Start Without Debugging. You may also want to refer to the ASP.NET and ATL Server debugging topic in the online documentation.
Please hellp
- Ajay K
|
|
|
|
|
Hi everyone,
I've got a few icons I'm using sprites for, however they seem to work in every single browser except IE7. My code's very simple:
<div style="display:inline;margin:0 10px">
<a href="javascript:window.print()" title="Print">
Print Page <div class="useicon" style="background-position:0px 0px"></div>
</a>
</div>
My useicon class:
div.useicon {
display:inline;
height:16px;
width:16px;
background:url('../img/icons.gif') no-repeat 0px 0px;
padding:0 8px
}
Now the problem apparently is the display:inline part of that - the sprites just don't show up as long as that div is inline (if I remove display:inline the sprites show up but the thing is I want everything on the same line). Already tried using span instead of div , unfortunately it appears that as long as the object is inline the sprites won't show up.
Any suggestions?
The padding: 0 8px is there to keep the width at 16px, because some browsers completely collapse the div because it's empty even though I've specified width:16px .
Thanks in advance
|
|
|
|
|
You might need to add a space to your div containing the sprite, inline rendering should always cause the height attribute to be ignored.
You will also need to add the style a {text-decoration: none;} to avoid an ugly line in your empty div.
|
|
|
|
|
Thanks! I can't believe I forgot to try that. It's working fine now.
|
|
|
|
|
Hi dear
you can let div#useicon stay block level but you must change a to block level and then float the div#useicon for gain width and height. and that work in all IE versions.
here the css code:
a
{
display:block;
width:16px;
height:16px;
overflow:hidden;
}
div#useicon
{
width:16px;
height:16px;
float:left;
}
I used overflow for get arount collapse height because of floating div#useicon .
|
|
|
|
|
I don't know if this can even be done... so before I pull out my hair figuring it out, I figured I would see if this is possible. What I want to do is this: Someone orders something from site, then on Merchant Computer, a printout of the order is printed directly to printer.
So in order for this to happen I'm assuming I would either have to have the printer connected to the same server that is hosting the website, somehow point directly (hardwire) to a specific computer on a specific IP address, or somehow write a file specically directed to the Merchants Hardrive and then calling a function to open that file and print.
Because I know php has that printer_open and all those cool print functions... but they only work internally or locally. I'm looking for an action that occurs externally to do something internally. It's hard to explain, so I apologize for the confusion. If I can somehow directly tell where to print to or write the file to a specific hardrive (I don't care about the privacy issues) then I know how to do the php script to print to the internal printer. Because the issue is that I don't have the site running from my own server (it's going to be hosting through a 3rd party) so I can't print to a printer because it doesn't know where to look.
Any help would be greatly appreciated!!!! THANKS
~michelle
|
|
|
|
|
You don't need a printer connected oth e web server. You can have a service running on any system that checks the database, or gets notified in some manner, then prints to a specific printer.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
What kind of service are you referring to? If something is done online, instantaneously I need it to print to a local printer. So if I have a service running that sees that a file is written or email sent out, how will it know the path to a specific printer if the file is called online? Or do you mean to have something running constantly on a local computer that constantly checks online activity then will print from a local printer? Because this is not a network ... I just want to see if I can direct a print job to a specific location... because if i just put "HP photosmart 150" or whatever the printer name is called, it is referring to a local computer on the client side... i need it to go the the merchant side. If you are saying to have a local checker (per say) running constantly, looking for activity online at a specific location, that makes more sense to me... but out of curiosity, what language would you write it in and how would you get it to run every minute or so automatically?
Thanks! I appreciate it!
|
|
|
|
|
Yes, you must have a local service runnng where the printing will occur. You can't direct a printer from the internet.
mrutkunas wrote: what language would you write it in and how would you get it to run every minute or so automatically?
It seems this very much out of your depth and needs to be left to others.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
You could just email a dedicated account with a link to the order and have someone responsible for processing the incoming emails.
This seems like something you should be able to develop. Although I like the idea of having a windows service poll the database and print out the order ... slick idea.
Good luck.
|
|
|
|
|
Expanding on your idea, you could set up a rule in the receiving mail client to print the incoming mail on arrival.
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
Okay, well..... This is what I am trying to achieve....
Go to this url and see where it says "does not work on your " and then it print's out the type of device you're using.
So I am looking for a code that will detect what browser the user is viewing the website with and if it's not one of the up-to-date browsers for desktops, then it would redirect the user to a mobile version of the site. I am basically trying to get this to work for my Playstation Portable. Whatever google is using for their detection is basically what I am looking for, all that it needs is the redirection script for the full version of the site. Thanks in advance!
|
|
|
|
|
This is virtually trhe same request as the previous post, and notwithstanding Pete O'Hanlon's (perfectly valid) points, I still stick by my obstinate viewpoint! However, if you must... there are dozens of such scripts out there, have you tried Googling for "browser detection script" or some such? You may want to take a look at this page[^].
Also, try installing Firebug[^] (on Firefox) and then visiting that invisible url you may or may not have posted (...) and you'll probably be able to view the script used there, if that does what you want...
|
|
|
|
|
i want to know if i some user open's a webpage in IE6 Page1.html should be displayed and if user open's a webpage in Page2.html should be displayed
how can i achieve this kind of display
|
|
|
|