|
thanks ok i have done
con = New OleDbConnection(connectionString)
' con.Open()
adp = New OleDbDataAdapter(str1, con)
Dim ds As New DataSet()
Dim cb As New OleDb.OleDbCommandBuilder(adp)
Dim row As DataRow
adp.Fill(ds)
Dim SourceLoc As String = "c:/india.bmp"
'Dim DestinationLoc As String = "c:/Images/TestImage.jpg"
Dim Fs As FileStream = New FileStream(SourceLoc, FileMode.Open, FileAccess.Read)
' Create a byte array of file stream length
Dim ImageData As Byte()
ReDim ImageData(Fs.Length)
Fs.Read(ImageData, 0, System.Convert.ToInt32(Fs.Length))
'Close the File Stream
Fs.Close()
row = ds.Tables(0).NewRow
row.Item(0) = ImageData
ds.Tables(0).Rows.Add(row)
adp.Update(ds)
Piyush Vardhan Singh
Senior Software Engineer
TAS NewDelhi
India
|
|
|
|
|
Piyush Vardhan Singh wrote: Dim Fs As FileStream = New FileStream(SourceLoc, FileMode.Open, FileAccess.Read)
' Create a byte array of file stream length
Dim ImageData As Byte()
ReDim ImageData(Fs.Length)
Fs.Read(ImageData, 0, System.Convert.ToInt32(Fs.Length))
'Close the File Stream
Fs.Close()
If you are using framework 2, you can replace this with:
Dim ImageData as Byte() = File.ReadAllBytes(SourceLoc)
---
single minded; short sighted; long gone;
|
|
|
|
|
Piyush Vardhan Singh wrote: Piyush Vardhan Singh
Senior Software Engineer
I am really surprised about how you became Senior Software Engineer ? Or you only decided that you are senior ?
|
|
|
|
|
hello
imagine there are 2 columns in a database like A & B and you'd like to sort the records by A/B
does anyone know what is the select statement?
thank you
|
|
|
|
|
If you mean to sort first by column A then B you can use:
SELECT * FROM tbl ORDER BY A, B ASC
|
|
|
|
|
no i mean sort by their average
but thank you anyway
|
|
|
|
|
Sorry I did not understand you the first time.
You can use this:
SELECT
A,
B,
AdividebyB
FROM
(
SELECT A, B, A/B AS AdividebyB FROM tbl
)
AS tblTMP
ORDER BY AdividebyB
|
|
|
|
|
wow thank you so much!
it worked!
|
|
|
|
|
|
i am facing a problem to validate the inputted user name expression. There is no build in validation expression in RegularExpressionValidator control for this.
please help me to create a custom validation expression that meet the following condition.
" user name may consist of a-z, 0-9, underscores, and a single dot (.) "
Thanks
|
|
|
|
|
rana_inam wrote: There is no build in validation expression in RegularExpressionValidator control for this.
Of course not, that's not what it does.
[\w\d_]+\.?[\w\d_]*
That matches any number of letters, number and underscores, either side of a single optional dot. It requires at least one character before the dot, this also stops it matching an empty string.
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 )
|
|
|
|
|
Hi
I have implemented Forum in my site using asp.net 2.0.
Now i want to implemented text editor with the forum?
How can i implement text editor with asp.net. Is there
any software/tool available for asp.net? How can i
implement text editor?Please help me?
Thanks
Rahul.
People Laugh on me Because i am
Different but i Laugh on them
Because they all are same.
|
|
|
|
|
Get it Text Editor
bEST rEGARD
pATHAN
please don't forget to vote on the post that helped you.
|
|
|
|
|
Thanks
I will tr it?
People Laugh on me Because i am
Different but i Laugh on them
Because they all are same.
|
|
|
|
|
|
Hi
I will try that but source code is not available with that download
of free text box then it is difficult it to integrate.
Thanks
Rahul
People Laugh on me Because i am Different
but i Laugh on them Because they all are same.
|
|
|
|
|
i am displaying search results with indexing server based on catalog name.if i want to search only directory within that catalog.how can we search.here ia m using asp.net with c#.net 2005
another problem is i want to display googles search results in datagrid component when i active google check button.any code plz send me.
venkat
|
|
|
|
|
Hello all,
I have created a SharePoint website with several pages and installed features (xml files for the context menu). I would like to know how I can deploy it to antoher SharePoint server? What is the best way to do it? I am new to SharePoint web application. I am using SharePoint Services 2007 and visual studio 2008.
Any suggestion would be greatly appreciated.
Thanks a lot.
Best regards,
Bin
|
|
|
|
|
There are shed loads of links about the IE6 needed to get the opacity fix for PNG images in IE6 (e.g.[^]), but does anybody know of a neat ASP.NET image control that handles this without the need to mod the CSS or run JS scripts (explicitly).
The hacks seem to work ok for static PNG, but I am dropping PNGs left right and center (not literally) on partial updates and the javscript hack is not playing ball with them.
Any ideas?
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
"This time yesterday, I still had 24 hours to meet the deadline I've just missed today."
|
|
|
|
|
I added a dropdownlist to a gridview by turning category id into a insert template and binding it to sqldatasource control but it will not show the category id. any suggestions
|
|
|
|
|
Normally, when I have used dropdowns in a gridview, I use a templated column. This allows me to control when the dropdown is there. I would assume you only want the dropdown when the line is in edit mode. Then when the gridview is bound to the sqldatasource you just bind the text of the dropdown to the correct value.
Hope that helps.
Ben
|
|
|
|
|
I used a template in my detailsview. I put the sqldatacontrol in this template with the dropdownlist. Still no working ,poor me
|
|
|
|
|
I have an odd issue and I'm hoping there is a way to do what I want. I'd like to have any HTML (.html and .htm) files go through a templating process first. So if a user tries to go to http://test/test.htm the server gives them the file that's been processed and had a template applied (default.master). I want this to only work on one of the sites in IIS not all of them. I was trying to work with the 404 error redirects but since the file is there that won't work.
Basically when the server sees a .htm or .html I want it to redirect to TEST.aspx with the old path and name as part of the URL querrystring. The TEST.aspx will read the old file and remove everything before and after the body tags. Then put the remainder in between the Content tags of the aspx file which will let ASP.NET 2.0 process it and add the master page.
I think I explained this well, if not please ask questions.
Thanks
|
|
|
|
|
You should look at writing a HttpHandler[^] that handles requests for HTML files within your website.
Paul Marfleet
|
|
|
|
|
I am not sure whether or not this is in the right forum. Feel free to move it if it is not.
I am having an issue formulating a form based file upload in HTML to an ASPX page on an IIS server. I am referencing RFC 1867 to get the appropriate syntax, and I guess RFC 1521 that outlines the MIME data streams. Here is the issue, the post itself is being formulated and works fine as long I do not add the filename="" parameter to the end of the content-disposition header. The second that filename="" parameter gets added to the content-disposition header for that particular parameter the ASPX page no longer recognizes it in the parameters collection. Is there something that I am doing wrong here?
Here is a sample of the syntax being sent.
WORKS:
Content-Disposition: form-data; name=""
DOES NOT WORK:
Content-Disposition: form-data; name=""; filename=""
Also, once this gets working I just have a couple other questions...
#1) What should be the "proper" Content-Type parameter value for an XML file? Content-Type: text/XML?
#2) If I send the Content-Transfer-Encoding: base64 parameter, will the ASPX page barf?
#3) I am assuming that I can get the extended field parameter attributes somehow through ASPX, is this so?
Please help...
~LizardWiz()
|
|
|
|