|
Hi Folks,
Any help for this issue would be appreciated.
Am trying to move a file from a soruce to destination folder in the following steps :
1)Check if destination directory exists [Directory.Exists(path)].. Else, create one.
2)DiretoryInfo di=new DirectoryInfo(sourcePath);
3)FileInfo[] fi= di.getFiles("TAX");
4)Foreach FileInfo
{
FileInfo.move(source, destination);
}
So, am getting an error right after the first step and error is "Second path fragment must not be a drive or UNC name. ".
Any ideas please?
Thanks,
RB
|
|
|
|
|
You have posted your question in the wrong message board. This has nothing to do with web development. You should post it in a programming language specific board.
---
b { font-weight: normal; }
|
|
|
|
|
Try this
DirectoryInfo di=new DirectoryInfo(sourcePath);
FileInfo[] fi = di.GetFiles();
foreach(FileInfo f in fi)
{
f.MoveTo(destination);
}
Hope this solves your problem.
Luck is Opportunity with hardwork
|
|
|
|
|
Hi there
code below is working fine at my local server (PC) but when i m uploading this code to live server then recordcount property return -1... any solutions????
dim rsRandom,sqlRandom<br />
set rsRandom = Server.CreateObject("ADODB.Recordset")<br />
sqlRandom = "Some query" <br />
rsRandom.open sqlRandom,conn,3,3<br />
response.write(rsRandom.recordCount)<br />
<br />
thanks in advance
|
|
|
|
|
That means that the recordset doesn't support random access to the rows but only sequential access. The RecordCount property doesn't work as the recordset doesn't know how many records there are. It's probably because you use a different database driver on the live server.
---
b { font-weight: normal; }
|
|
|
|
|
Hello Guffa
thanks for your reply. Yes You are right. I m using MYSQL at live server. so wat a solution for this.. I mean how can i get recordcount when i use MYSQL..
thanks once again
|
|
|
|
|
Thanks Guffa
i got solution
Function RecCount(rsdef)<br />
if rsdef.eof then<br />
RecCount = 0<br />
else<br />
intRows = rsdef.GetRows<br />
rsdef.MoveFirst<br />
RecCount = UBound(intRows,2) + 1<br />
end if<br />
End Function
bye for now
|
|
|
|
|
So you only want to count the records? Then you shouldn't even fetch all the records, but count them in the database query and only return the number of records.
Example:
strSQL = "select count(*) from Users"
objRS = objConnection.Execute(strSQL)
lngCount = objRS(0)
objRS.Close()
Set objRS = Nothing
---
b { font-weight: normal; }
|
|
|
|
|
and if can... how to do it?
|
|
|
|
|
No, it can't.
You can specify a mailto: url as action of the form, that will use the default mail program of the client computer to send a mail containing the data from the form.
---
b { font-weight: normal; }
|
|
|
|
|
i use a iframe with style='filter:alpha(opacity=60)'.
iframe shows some jpeg image in it.
some image is shown well, but some image is shown with broken pixels.
if i remove filter option, all images have no problem.
how can i fix this? is it possible?
thanks.
|
|
|
|
|
In what way are the pixels broken?
Does this occur in a specific browser?
---
b { font-weight: normal; }
|
|
|
|
|
|
How to get number of rows affected while inserting?
in stored procedure
Jesuraj
|
|
|
|
|
@@rowcount
You have better chances of getting an answer if you ask SQL questions in the SQL message board.
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
I am also saying the same , ask the SQL based questions in SQL Message Board MR.Thaddi.
Regards
sarathy
Know is Drop, Unknown is Ocean
|
|
|
|
|
Hi all,
I create an asp.net application
I want to create message board, same like code project msg board,
Give any idea or samples,
thanks
|
|
|
|
|
I believe the CP forums have a lot of javascript action going on.
A message board is pretty easy tho, you just store the messages in your database, and render them on the screen. I believe there are examples on the site, as well ( not of the actual CP forums, but other ones offered in articles ).
There is an ASP.NET forum, although 'I want an example of hwo to write my app' is not a great question to be asking, more specific questions tend to get better answers.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi,
I have an ASP page that draws up a report and display it to the user. If the user wishes to do so, he can click a "print" button which activates the printer dialog via javascript. This would be the same as if they selected "File > Print" from the browser menu.
My problem is that at hte top of the page, page numbers are added automatically, and at the bottom the URL of the page that was printed. Is there a way to get rid of this extra information, so that a "clean" document can be printed with only the results from the report.
Any help would be appreciated,
Thanks.
Mr.mark
|
|
|
|
|
|
Hello,
I'm accessing a page from a VB app using the XMLHTTP object, I was wondering if using cookies (storing and recieving) works like in internet explorer? Or to make cookies work with this object I need to set special options?
Thanx.
Shahar.
|
|
|
|
|
You have to handle the cookies that you get in the responses, and send them back in the requests.
---
b { font-weight: normal; }
|
|
|
|
|
Hi Guys,
Could any one help me out with codes to add rows to a table. Well I kinda of got the codes from the following site (http://www.interviewboard.com/DHTMLSamples/DHTMLGridSample.htm) the problem is this example only shows input box. Now i have a list that means a 'select box' for which the value is retrieved from Database and populated into the select list box. Now according to the example if all residing in the javascript how am i gng to do that!. For example I have the default row which has 3 text box, a select box(populated from database and a delete button). Outside the table i have add row
When i click on add row another row should be created with 3 text box, a select box and a delete button. all these input box and select box whould have unique names cas i need to pass them to another page to get the values.
can anyone help please.
Thanks in advance
Regards
philip
|
|
|
|
|
I have a few HTML labels for ASP.NET textboxes
But i want all the labels a set size so the textboxes to thier right all lign up.
Using asp.net text boxes with a set width works in IE7 but not FF.
I then switched to HTML labels with "width" set in CSS which does not seem to work.
This seems like it should be so simple but I cant seem to get anice consitant label width under FF and IE7
|
|
|
|
|
I usually use something like this:
<div class="Form">
<div class="Item">
<label for="fldName">Name:</label>
<asp:TextBox id="fldName" runat="server" CssClass="Field" />
</div>
</div>
and the CSS:
.Form .Item { clear: both; }
.Form .Item label { float: left; widh: 100px; }
.Form .Item .Field { float: left; width: 200px; }
---
b { font-weight: normal; }
|
|
|
|