|
Hi,
May I know if how can I call an Excel Macro from my ASP.Net?
Thanks
hifiger2004
|
|
|
|
|
Hi
I would appreciate any assistance with the above.
I am use to VBA in Access which is a 1 line code - docmd.tranfertext... to import information into an access database.
I am working with VB.net in ASP.net. I am new to this environment.
I already have a table tblcurrency. I want to update my table with text file C:\Textfile.txt
I will change the paths later - just want the code to work first
The error is:
Syntax error in INSERT INTO statement. - Microsoft JET Database Engine
My code is:
Dim cnn As OleDbConnection
Dim strSQL As String
Dim Debug As Diagnostics.Debug
cnn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source = c:\Inetpub\wwwroot\TestDB\DB\Bonus.mdb")
cnn.Open()
strSQL = "INSERT INTO [TblCurrency] (Country, Year) SELECT F1, F2 FROM[Text;HDR=NO;DATABASE=C:\;].[test.txt]"
Dim objCommand As New System.Data.OleDb.OleDbCommand(strSQL, cnn)
objCommand.CommandText = strSQL
objCommand.ExecuteNonQuery()
cnn.Close()
Thx
Rykie
|
|
|
|
|
VBscript and VB.NET are totally different. What you're dong here, just plain won't work. You want to read the text file in VB.NET, parse it, and then use that to write proper SQL for Access.
System.IO.File.ReadAllLines will read your file into a string array, that's a good place to start.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hai friends,
I am having a problem in my asp.net project.I have a form that has some anthem dropdowns which is data binded.I am opening a new page as popup and adding some data to the database.I wants the dropdown to update the added values when the popup is closed.I cant use
on child page because it destroys the values in the text boxes.
I can call a javascript function in the parent page like..
and the function in parent page as
function UpdateCity()
{
document.getElementById('<%=ddlCity.ClientID%>').Databind();
}
But i cant get the databind to work.Can anyone help me...Is there any other way to accomplish this..?
|
|
|
|
|
Sorry Guy you can not use .DataBind method you must have to refresh the page and do code on server side
Best Regards,
Chetan Patel
|
|
|
|
|
Is it really possible to start a program that resides in the server from a web application?
I am using following code:
<br />
using System.Diagnostics;<br />
<br />
Process startNotepad = new Process();<br />
startNotepad.StartInfo.FileName = "notepad.exe";<br />
<br />
startNotepad.StartInfo.UseShellExecute = true;<br />
startNotepad.StartInfo.CreateNoWindow = false;<br />
<br />
startNotepad.Start();
This works while debugging the page. I can see notepad start. But when I try it in a server I dont see Notepad, but I do see a process in task manager started
|
|
|
|
|
The owner the process started from your web application is ASPNET. ASPNET does not have an active desktop, thus, the process will run but will not display.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
Does that mean I could run an application (.exe) in the background (say one without a user interface) that I upload to my server using this method? Say, for example, one that sends out emails to a list I upload... How about one that wipes the server hard-disk.. eek...
Fred
|
|
|
|
|
If ASPNET's access is more than its default access, you are opening up your web server to some nasty security issues. There are more secure ways of doing running a process.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
is it possible to make aspnet has the rights then?
|
|
|
|
|
It is possible but not advisable.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
I guess it has to be a security issue, am I right?
|
|
|
|
|
Yes, it can be a security issue. Also, you loose a lot of control of your application since you are running mulitple processes. Since your web application may have several user using your application at the same time, running several of the same local processes can be come a resource hog or cause some unforeseen conflicts. If a local process fails, how do you recover?
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
ok, I understand now. thanks for the answer
|
|
|
|
|
hi,
can somebody tell me how can i automate the website according to system display settings?
for e.g if i open a website on one system which has resolution setting set to 800 then my website automatically adjusts itself to that resolution. And if i pen the same website on other system with resoltuion of system set to 1024 then my website should get automatically adjusted to that resolution.
thanks,
harry
|
|
|
|
|
You can get the system display settings by using screen.width and screen.height, although I'm not sure if that's what you need.
There's also screen.availWidth and screen.availHeight, which are the available width and height.
|
|
|
|
|
Hi All,
I am fetch data from XML File and show that data in GridView. Now when I edit any of the row in a GridView I need to updated row to the same XML File.
I am using Ajax toolkit HoverMenuExtender for showing Edit and Cancel.
Please help me...
Thanks in advance...
|
|
|
|
|
Hi ,
I have developed an application wherein the user can upload his photo in a div. The photo is automatically checked and stored using AJAX. I want the user should not be able to do anything else while uploading.Hence i want to gray out all the elements on that page. I thought it would be foolish to disable each item on the page. Is there any method to disable all items on that page all at once?
When you fail to plan, you are planning to fail.
|
|
|
|
|
Hi,
Ive done an application in ASP.Net with C# and data stored in an XML.
In this application, I used XmlMembership Provider class for adding users,Change Password,Delete User into the XML file.
Problem is when i published it in IIS, and tried to add or Delete or Change password,Im getting an error "Cannot Acces File.Because it is being used by another Process".
How to solve this issue?
Anyone Plz help!
Thanks in Advance.
|
|
|
|
|
You need to give ASPNET NTFS write priviledges. The default is only read. Also, you will have multiple accesses of that file. Thus, you may need to use the cache.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
Hi Guys,
I have a doubt on the working of update panel control. I remember reading that even though it allows partial page update behind the scenes its does a full post back.Or will it be sending and recieving only a part of it.
Thanks in advance for your advice
Laddie
|
|
|
|
|
Check out this page in ie, then check it out in fire fox or safari. This is valid XHTML 1.0.
http://profile.prosoco.com/product_list.aspx[^]
There is a div that displays when you hover over "Espanol".
Why does the div display at the far left of the next line in mozilla and just below the text (Espanol) in IE?
I want it to show up just under the text, espanol. How can I get it to do that?
Thanks in advance.
-- modified at 10:39 Wednesday 5th September, 2007
|
|
|
|
|
|
Which part of that article are you suggesting applies to my position:absolute issue? In scanning the article I didn't see anything relavent.
|
|
|
|
|
You need to figure this one on your own since the solution may affect other parts of the page or code added in the future. Also, each version of IE has its own set of bugs. Here is a link that covers a lot of IE bugs with fixes\hacks:
http://www.positioniseverything.net/[^]
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|