|
I have problems to show images in a datagrid. I was looking for some answer and I found that if I use this code it should be work.
Dim Comm As New OleDbCommand(QPhoto, con.Con)
Conexion.Open()
Dim OledbRead As OleDbDataReader
OledbRead = Comm.ExecuteReader(CommandBehavior.CloseConnection)
Do While (OledbRead.Read)
Response.ContentType = OledbRead.Item("IDArti")
Response.BinaryWrite(OledbRead.Item("Image"))
Loop
con.Con.Close()
But, unfortunatelly it doesn't work. When I try to run this code, it asks me if I want to open or save and the both options don't do anything.
Could you help me?
I have the images in Access database and I want to display them in the datagrid with the information of each row
Please, help me I'm stressed out
|
|
|
|
|
Well, this is ASP.NET code. And it's never going to work, no. Nor could it hope to. Perhaps you need to ask in the right forums, and understand the code you're using.
A HTTP Handler to stream images is what you need.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
I am trying to create the shortcut menu for MS Access application. I am sucessful in creating shortcut menu for all options other than "Filter For" menu option (right click).
Could you please help me how to get this option.
Thanks
KP
|
|
|
|
|
Hello ,
I am using this code to send an E-mail from a Gmail account :
Dim SmtpServer As New SmtpClient()
SmtpServer.Credentials = New Net.NetworkCredential("xxx@gmail.com", "password")
'SmtpServer.Credentials = New Net.w
SmtpServer.Port = 587
SmtpServer.Host = "smtp.gmail.com"
SmtpServer.EnableSsl = True
mail = New MailMessage()
Dim addr() As String = TextBox1.Text.Split(",")
Try
mail.From = New MailAddress("bankersystem@gmail.com", "Web Developers", System.Text.Encoding.UTF8)
Dim i As Byte
For i = 0 To addr.Length - 1
mail.To.Add(addr(i))
Next
mail.Subject = TextBox3.Text
mail.Body = TextBox4.Text
If ListBox1.Items.Count <> 0 Then
For i = 0 To ListBox1.Items.Count - 1
mail.Attachments.Add(New Attachment(ListBox1.Items.Item(i)))
Next
End If
mail.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure
mail.ReplyTo = New MailAddress(TextBox1.Text)
SmtpServer.Send(mail)
Catch ex As Exception
MsgBox(ex.ToString())
End Try
When I use the broadband connection at home , all work fine . However when I use the wireless connection at uni , It gives me always an error that it cannot connect to host and cant send the message !!!
Any idea ?!
J ,
|
|
|
|
|
Hi,
When you say it works at home? Alarm bell should be ringing here! if it works what are you doing differently at uni, i.e. are you using a wired connection at home and a wireless connection at uni etc...
Many uni's have proxy servers and this could also be an issue - you need to take the uni out of the equation try it on a different wireless network and eliminate the problem down.
To test your code try and a do a simple web request i.e get the html or a website,you can get the code off google, if it this in both places then this tells you you can acces the web your uni's proxy if not then its got to be your code, and you may have to pass up them credentials also.
Andy
|
|
|
|
|
Hy ,
At uni it is wireless connection and at home the connection is wired !! I mentioned that befor in the first messaged i posted !
Thx for the help Andy .
J ,
|
|
|
|
|
I use Vb 2005. I haven't experience in this technology so I don't know how can I reference a C sharp Class - NavigationPane - from my project in vb net.
Thanks!
|
|
|
|
|
You can put it in a dll and reuse it from there.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi
I am facing problem while using windows API in VB.net 2005.
This is the code i am using.
<br />
Private Structure WSADATA<br />
Dim wVersion As Short<br />
Dim wHighVersion As Short<br />
<vbfixedarray(wsadescription_len)> Dim szDescription() As Byte<br />
<vbfixedarray(wsasys_status_len)> Dim szSystemStatus() As Byte<br />
Dim iMaxSockets As Short<br />
Dim iMaxUdpDg As Short<br />
Dim lpszVendorInfo As Integer<br />
<br />
Public Sub Initialize()<br />
ReDim szDescription(WSADescription_Len)<br />
ReDim szSystemStatus(WSASYS_Status_Len)<br />
End Sub<br />
End Structure<br />
<br />
Private Const WS_VERSION_REQD As Short = &H101S<br />
<br />
Dim WSAD As New WSADATA<br />
Dim iReturn As Short<br />
iReturn = WSAStartup(WS_VERSION_REQD, WSAD)------>This statement is returning an error saying that<br />
<br />
"System.AccessViolationException was unhandled<br />
Message="Attempted to read or write protected memory. This is often an indication that other memory is corrupt.""<br />
</vbfixedarray(wsasys_status_len)></vbfixedarray(wsadescription_len)>
Please give the suggestions .
Thanks ,
Chaitanya
|
|
|
|
|
Hi
i have populated data to treeview from sql so i want display information on the list box about certain childnodes e.g(product id ,product price)when ever a node is selected from treeview.
Mamphekgo
|
|
|
|
|
Sorry, what is the question? You probably have all the info you need in the node/children.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
You should use the code on AfterCheck of Treeview.
Cheers
Anubhava Dimri
anubhava.prodata@gmail.com
925016195
|
|
|
|
|
how do i create my own real media player on vb6 and if possible the media player should also play avi and mp3 formats too (an all in player). Is there a tutorial that can tell me how to make the player.
|
|
|
|
|
Bad Spinky !
No yelling, we are not blind.
Using vb6 when you don't have to is bad, no supper for you tonight.
First download a newer programming tool, for example from here: http://www.microsoft.com/express/default.aspx[^] and learn about .net
To answer your question: you could use google to find programming tutorials, but it is very unlikely that you'll find one that will teach you exactly what you want.
You'll probably have better luck breaking down the idea of a mediaplayer into functionality-parts:
(find media files, how to determine which file is video, and which is music, etc, etc). On such smaller functionalities you are more likely to find tutorials, articles and/or examples. At least you should be able to find tutorials or examples that show similar processes, which you can then adapt to your needs.
Good luck with your project,
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
Johan Hakkesteegt wrote: Bad Spinky !
gold
|
|
|
|
|
1. TURN CAPS LOCK off
2. I suggest using .NET - the express versions are free
3. Try Google, you will probably get some guidelines if you look for individual bits like how to play an mp3, how to play an avi etc
4. Good Luck
Bob
Ashfield Consultants Ltd
|
|
|
|
|
VB6 is rubbish. It's also a dead language.
You can only create your own media player in C++. Or, you can just import a media player control and pretend you wrote a media player, I suspect that's what you really want to do.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Christian Graus wrote: You can only create your own media player in C++.
Why not in C#?
|
|
|
|
|
I am using vb.net 2005 with Crystal reports version 10.
I get this problem when I try and load my application on a users PC. Works great with me but I have a problem in a user's PC.
Any ideas?
"Could not load file or assembly 'CrystalDecisions.Shared,
Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one
of its dependencies. "
|
|
|
|
|
IS_Assessor wrote: I am using vb.net 2005 with Crystal reports version 10.
I get this problem when I try and load my application on a users PC. Works great with me but I have a problem in a user's PC.
Any ideas?
"Could not load file or assembly 'CrystalDecisions.Shared,
Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one
of its dependencies. "
Does your project setup on the user's PC contain the Crystal distribution files?
|
|
|
|
|
In my references I have,
CrystalDecisions.CrystalReports.engine
CrystalDecisions.ReportSources
CrystalDecisions.Windows.Forms
On the installation setup I have
Crystal_Database_Access2003.msm
Crystal_Database_Access2003_enu.msm
Crystal_Managed2003
Crystal_regwiz2003
On the user's PC they have no Crystal report references.
I hope this is helpfull.
|
|
|
|
|
The Business Objects site will have a list of runtime distribution requirements for Crystal Reports.
|
|
|
|
|
This problem is generated by Crystal Report Component.Because it have not access of those component.
You must to add the file CrystalReportsRedist2005_x86.msm with your setup.
You can download from internet it's freeware of Crystal Report.
this msm has two version
CrystalReportsRedist2005_x86 For 32 bit Machine
CrystalReportsRedist2005_x48 For 64 bit machine
Cheers
Anubhava Dimri
anubhava.prodata@gmail.com
|
|
|
|
|
What is the difference between Return and Exit Sub?
|
|
|
|
|
Return is used in functions to return the derived value or object back to the calling sub/function.
Exit Sub is failry self explanatory, used to exit a sub before the sub has run it's full course.
Somebody correct me if I'm wrong but is 'exit sub' generally regarded as 'dirty' programming? I say this as I am lead to believe that if a sub is coded correctly, it doesn't need to exited early.
|
|
|
|