|
I have an MP3 stored in a database. I need to play the file without dumping it first into a file, but directly play it using the byte array I retrieve from the database. Is it possible to do this? Thanks in advance.
|
|
|
|
|
Hi I am not sure but you can try mcisendstring function ....
best luck
|
|
|
|
|
I am trying to write to an absolute path from classic ASP using VB scripting.
The following works fine (for relative path):
Filepath = Server.MapPath("log_dmj.txt")
I would like to write to an absolute path ("C:\yadda\yadda" does not work as it is not a virtual path.)
DWreck
|
|
|
|
|
If this code is running server-side, then you only have to supply the fully qualified path. BUT!! That will only work if the ASP process has Read permissions to the path being references.
Filepath = "C:\yadda\yadda"
If this code is running client-side, there's nothing you can do except change your design. The web server will NOT give clients access to anything outside of the side directory that the page was served from.
|
|
|
|
|
Thanks for responding...
I am using this in server side code (classic ASP between the sript (<% %>) tags.)
I used the fully qualified path but got the following error:
Error Type:
Server.MapPath(), ASP 0172 (0x80004005)
The Path parameter for the MapPath method must be a virtual path. A physical path was used.
/HFHS/Code/Debugging.asp, line 16
Browser Type:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
-DWreck
|
|
|
|
|
So what's not to understand?? If this is server side code, all you have to do is provide the fully qualified path. You don't have to use Server.MapPath! I already gave you an example of this in my previous post. This is, like I stated in my previous post, subject to the limitations of NTFS Security and the account under which your ASP site is running.
|
|
|
|
|
I populate a combobox as follows:
<code>ComboBox2.Items.Clear()
ComboBox2.Items.AddRange(ScanHistoryList)
ComboBox2.SelectedIndex = 0</code>
ScanHistoryList is a string array.
I want to be able to allow the user to add to/edit the combobox .
How do I do this?
Any help much appreciated - I can't find a property to set
You always pass failure on the way to success.
|
|
|
|
|
I think you need to achive this prgamatilally by traping the events and if the text is changed while drop down event replace the older text with new one and if older text is a blank then add the new Item inthe list.Just try it
|
|
|
|
|
Thanks I'll give that a go
You always pass failure on the way to success.
|
|
|
|
|
Hmmm... I guess you could put a button next to the ComboBox, called Edit, that gets the current SelectedItem in the ComboBox, and put the text of the item into a small form with a TextBox. That form would have a OK and Cancel button. If OK, then the SelectedItem would be replaced with the new text.
|
|
|
|
|
Thanks Dave and Ciacia,
I've solved it.
First thing I did was turn it into a DropDown rather than DropDownList. This allows the users to edit the data
Then I created the following event handlers:
<code> Private Sub ComboBox2_SelectedTextChange(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox2.TextChanged
textChanged = True
End Sub
Private Sub ComboBox2_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox2.Leave
If textChanged Then
ComboBox2.Items.Insert(ComboBox2.Items.Count, ComboBox2.Text)
ComboBox2.SelectedIndex = ComboBox2.Items.Count - 1
End If
End Sub
</code>
Note: textChanged is declared as a boolean variable.
What happens then is that when the user leaves the combobox if they have changed any text: this is added to the end of the combobox array collection and this is then made the current selection.
Thanks for your help guys. It's a shame that something which seems so simple can be so tricky!
You always pass failure on the way to success.
|
|
|
|
|
|
I don't see anything wrong with this approach. Quick and easy
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Hi All,
Being a dot net beginner, i would like to know about biztalk.
What is biztalk? whats it role and how it can be used?
Please explain with an example.
Thanks.
|
|
|
|
|
|
Sharepoint doesn't have anything to do with the .NET Framework. Read up on it here[^].
d_smita wrote: where and How can i implement it ?
Why would you want to do that when you don't know anything about it?
|
|
|
|
|
How can i make a stopwatch ? (Using VB.NET)
|
|
|
|
|
hope this will help you.
SSK.
|
|
|
|
|
you can also use:
Dim sw As New Stopwatch
sw.start
'do what you want to do
sw.stop
secondspassed = sw.ElapsedMilliseconds/1000
This seems much less complicated than the other way to do
|
|
|
|
|
hi
i want to create a PDF files using a HTML/DOC Source file using vb.net.
can somebody help me?
Thanks
|
|
|
|
|
hope this will help you.
SSK.
|
|
|
|
|
Hey guys, I'm having a little trouble with what I'm trying to do. I think there is just one or two lines of code that need to be entered (to what I already have), but I'm not exatly sure what it is.
What I'm trying to do extract one record from a SQL database, because right now I have the SQL statement in a combobox with visable disabled, and I know that's not correct.
Here is what I was thinking, and if this is totally wrong just let me know.
Sub Temp(ByVal myConnString As String)
Dim mySelectQuery As String = "SELECT MAX(TicketID) AS Expr1 FROM tblTicket"
Dim myConnection As New Data.SqlClient.SqlConnection(myConnString)
Dim myCommand As New Data.SqlClient.SqlCommand(mySelectQuery, myConnection)
myConnection.Open()
Dim myReader As Data.SqlClient.SqlDataReader
myReader = myCommand.ExecuteReader()
myReader.Close()
myConnection.Close()
End Sub
The exact bit of data I want to extract is what would be in "Expr1".
I've tried several different things, as in...
Dim Number as Double
...
Number = myReader...
Hopefully there is just a few lines of code that can be entered to extract that data, if anyone can help me I'd really appreciate it.
Thanks,
aqzman
|
|
|
|
|
If you are only ever going to retrieve the first column of the first row (or that the data only has one row, and the row only has one column) then you can use ExecuteScalar() - That will save you faffing around with DataReaders.
Here is an updated snippet:
myConnection.Open()<br />
Dim someValue As Object = myCommand.ExecuteScalar();<br />
myConnection.Close()
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
That worked like a charm!
Thanks a lot for the help!
|
|
|
|
|
I answered your question in the sql forum, please don't cross post and please put more meaningful subject lines in your posts.
Ben
|
|
|
|