|
this article[^] by dan dombrowski might be helpful
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
Is there any way we can reverse the string in one command
for eg
dim str as string
str="Hollywood"
in one command can we make
str="doowylloH"
|
|
|
|
|
Nope. You're going to have to write your own mdethod to do it. I suggest looking into the StringBuilder class to accomplish this.
|
|
|
|
|
i understand Dave
I know how to loop through the string and get it done but i was just asking if any of you who knows the better and short way .
Because I was wondering if there would be a function like:
string.reverse
by .net or any other similar functions.
I was just trying to learn some new thing.
Thanks for your comment
|
|
|
|
|
Well, only if you create a method like ReverseString, but you'll still have to code the actual algorithm to reverse the string.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
ya that's what i was looking for and also found out from other forums that
I can convert the string into
chararray() and then do the Array.reverse()
thanks Paul
|
|
|
|
|
Cool deal. It's late and been a long day, and I didn't even think of going the array route Glad you found a way to do the string reversal.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
and also for those who are looking for similar answers
The VB function StrReverse() can be used by importing the Microsoft.VisualBasic Namespace
|
|
|
|
|
CodeProject really doesn't help with obvious homework problems
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
Can anyone tell me why I get this error. This happens when I try to save a backup to a folder other than the default SQL backup folder...
"System.Data.SqlClient.SqlError: Cannot open backup device 'C:\Program Files\mycompany\mytool\backups\myDB 922008111739.bak'. Operating system error 5(Access is denied.)."
any help will be greatly appreciated..
Rafone
Statistics are like bikini's...
What they reveal is astonishing ...
But what they hide is vital ...
|
|
|
|
|
SQL Server doesnt have Permissions to that folder.
|
|
|
|
|
It's simple. The person running the code doesn't have write permissions to that folder.
Normal users don't normally have write permissions to anything under Program Files.
|
|
|
|
|
I can write the backups to any folder on my machine as long as I am in VS.
I built an install and running the installer and running the app afterwards (as the administrator) on the same machine I can only write to the backup folder of SQL. It by default installed the program into the Program Folder. Which I think according to MS rules is where it should be.
This machine is the admin machine I have full rights to everthing.
Any other thoughts?
Rafone
Statistics are like bikini's...
What they reveal is astonishing ...
But what they hide is vital ...
|
|
|
|
|
Like Bassam said, the SQL Server or Agent service doesn't have write permissions to that folder.
I thought you were writing the backup file yourself. My mistake. Your code is telling SQL Server to run the backup for you. It doesn't have the appropriate permissions. You'd normally have a folder (not under Program Files) dedicated to storing SQL backups, with appropriate permissions on it.
|
|
|
|
|
What are the permission settings on that particular folder?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Hi,
I'm using SqlDependency to get changes from a Sql 2005 Server. Every time there are changes on the Recordset i get the whole one - but I need and want only the changed Rows!
Does anyobdy knows a way?
Thanks,
maged
|
|
|
|
|
It would be nice if you posted some code as to what you're trying to do - the question is kinda vague.
You could try looping the rows and checking the record status and updating the ones with a status of modified.
If your in .Net, you can call dataset.getchanges.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
|
|
|
|
|
Hi, so im working with Reporting services in visual studio 2005 - visual basic.
my question is related to passing parameters through dropdownlists.
On my default.aspx page ive got reportviewer1, and dropdownlist1 and button1.
each report has one parameter - also passed through with a dropdownlist.
I want to : In dropdownlist1 choose the report i want to run, when i chose the specific report from the dropdownlist1 - that specific reports dropdownlist parameter must become visible. from there i want to choose the specific parameter and then click on the button1 to generate the report.
Can you please help me with this, as my knowledge on programming is v-e-r-y vague.....
Here is my code im trying to figure out...i gather im going to be using if statements. I set my dropdownitems's value to the path of the specific report, for starters....
Partial Public Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
Protected Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'report server Url
Me.ReportViewer1.ServerReport.ReportServerUrl = New System.Uri("http://localhost/reportserver")
'Make any report the parent report
While Me.ReportViewer1.ServerReport.IsDrillthroughReport
Me.ReportViewer1.PerformBack()
End While
Dim strReport As String = DropDownList1.SelectedValue
Me.ReportViewer1.ServerReport.ReportPath = strReport
End If
End Sub
Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DropDownList1.SelectedIndexChanged
Dim strReport As String = DropDownList1.SelectedValue
Me.ReportViewer1.ServerReport.ReportPath = strReport
If DropDownList1.SelectedIndex = 0 Then
strReport = "\ClientPerPackage.rdlc"
ElseIf DropDownList1.SelectedIndex = 1 Then
strReport = "\stocklist.rdlc"
End If
End Sub
End Class
:confused::confused::confused::confused::confused::confused:
|
|
|
|
|
|
Thanks for the reply, but i'm using Reporting Services. My dataset i created through drag and drop. Does that work anyway?
Now, the only code that i need to write is the code for the parameters, am i right?
On dropdownlist should show with 5 reports you can choose from.if you choose a report,another dropdown should appear to choose the parameter. And then, when you click the button, the report should generate.
Would you recommend an easier way to do it, or can you please help me with this...
I understand it like this:
Protected Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'report server Url
Me.ReportViewer1.ServerReport.ReportServerUrl = New System.Uri("http://localhost/reportserver")
'Make any report the parent report
While Me.ReportViewer1.ServerReport.IsDrillthroughReport
Me.ReportViewer1.PerformBack()
End While
'DOESNT THIS SAY THAT WHICH EVER REPORT I CHOSE MUST BE SHOWN?
<big>1</big> Dim strReport As String = DropDownList1.SelectedValue
Me.ReportViewer1.ServerReport.ReportPath = strReport
<big>3</big> then, if you click the button the specific report must generate
then in the dropdownlist1 event:
<big>2</big> I want if-statements like:
if i choose dropdown index 0 then
show parameter dropdownlist2 to choose from
if i choose dropdown index 1 then
show parameter dropdownlist3 to choose from
end if
end if
please can someone help me wit this....im a beginner in this stuff!!!!
|
|
|
|
|
hi,
I have an asp.net/vb.net application in which i am using the shell command for getting the pdf creator exe.
It works properly but the problem is it is showing the print dialog box. But i dont want to show this. It should directly go to the default printer. Is anybody have answer?
this is the code i am using
Shell("C:\Program Files\PDFCreator\pdfcreator.exe " + "/PF" + "C:\test.html")
please help me..
shyam
|
|
|
|
|
Jithin Shyam wrote: It works properly but the problem is it is showing the print dialog box. But i dont want to show this. It should directly go to the default printer. Is anybody have answer?
You can do nothing with this, as it is PDF creator who is calling the print dialog...
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
I am building an application in VB.Net and i am using ms access database. The problem is that when i insert data into the database, it goes alright but upon running the program again, the database loses all its data.
I went to the dataset code and saw this property "ClearBeforeFill" been set to true and i changed it to false yet the problem persists.
Can somebody come to my aid.
|
|
|
|
|
ClearBeforeFill indicates the Fill method shall clear the dataset before filling it. It has nothing to do to with the database.
I guess your problem is one of the following:
- You don't call the Update method.
- Your database gets overwritten every build. This is determined by the "Copy to Output Directory" property of the database file (select the file from the Solution Explorer, you'll find this property in the Properties Window).
And let me know if this solves your problem.
Eslam Afifi
|
|
|
|
|
are you using Vista?
it could be a problem with the rights (virtualization and such)
|
|
|
|