|
And you're telling me this why??? I know that, and your answer has nothing to do with the problem.
|
|
|
|
|
|
Hi everybody!
I'm developing an application that has to be easy to update, so what I did is a general application that calls diferent dll's. Like this if I change a method that is in A.dll I have only to recomplile this A project and put A.dll in the main application folder.
For now everythink fine, but if I change the version of A.dll (when I change something this would be a new version...) and recompile it and replace the old A.dll the main application give me an error...
Any Idea what I have to do?? Is has anything to do with the COM interop??I have no idea about this!
In project properties there is Signing, what is this about??
I know I have many questions, but I'm new in this...
thanks a lot!!!
alba
|
|
|
|
|
When you early bind to a .DLL from another project, part of the fully qualified name in the binding is the assembly version number. The code doesn't just look for the correct filename. It also looks for the correct version is was bound to.
It has nothing to do with COM Interop.
What you have to do is redirect that binding to the version of the assembly you want it to use. Look in this article[^]. What you're looking for is "BindingRedirect".
|
|
|
|
|
But what I need is be able to change the version of a .dll and don't have to recompile the main application... Is there any way to do that??
Thanks!!
alba
|
|
|
|
|
You didn't read the article, did you? You don't recompile the application. You modify the app's config file and add the BindingRedirect section to tell the loader what the old and new version numbers of the .DLL are. Any binding that goes to the old .DLL version would get redirected to the new version number.
All you do is rename the old .DLL, copy in the new one, then make the BindingRedirect changes. Done.
|
|
|
|
|
Don't put this .DLL in the GAC. If it's application specific, Microsoft actually recommends against doing this.
|
|
|
|
|
Why don't you just assign a strong name to the assembly and install it to the Globle Assembly Cache. This won't only improve the performance of your Application but also allows you to change anything in the assembly without worrying about the versioning conflict.
AliAmjad (MCP)
|
|
|
|
|
Do I have to Install it into the global caché assembly or can I just put it on the application folder??
thanks for ur help!!!
alba
|
|
|
|
|
No install it in the Globle Assembly Cache because CLR actually first explore the assemblies installed in the GAC so It'll be able to discover the assembly in the early stages this way the performance of your application will increase more and you don't have to worry about the version of your application.
AliAmjad (MCP)
|
|
|
|
|
thanks for ur help!!
alba
|
|
|
|
|
Currently have a VB6.0 program that is used to monitor/control a device via a serial connection. It is constantly polling the device to keep data up to date and to keep the communication link active.
My problem is finding a reliable way to access the data via an external program (written in C++)(ProgC++). The previous programmer has been using "SendMessage" to send information to the VB6.0 program(ProgVB) and setup portions of device but his way of addressing getting information back from the program doesn't work. He was trying to use a similiar "SendMessage" approach but didn't take into account that the SendMessage from ProgC++ until the SendMessage from ProgVB finishes and that will only finish once ProgC++ reads it and acts on it. So it gets stuck in a cycle where neither program will run until the other finishes. Thought of using PostMessage but run into the issue where the data may not be valid in time for me to use it since PostMessage never reports when the message has been handled like SendMessage does. Is there a way to build external subroutines into VB6.0 that I can access from outside of the program?
Thanks,
George
|
|
|
|
|
SendMessage is the poor-mans hack to IPC. I suggest using REAL Interprocess Communication. There's probably some IPC component out on the web somewhere. I just don't know of any off the top of my head. I stopped using VB6 6 years ago.
|
|
|
|
|
Dave Kreskowiak wrote: VB6 6 years ago.
Took me a second to realise that wasn't a typo...
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 all,
I m tryin to write data from Visual Basic (VB) to Excel sheet.
I m writing data into three different excel files with one at a time. The logic works fine for writing the data but the problem is displaying the files.
First excel is displayed perfectly. But when I write in second excel file & try to open it while the first is opened, the second automatically becomes hidden.
This file can only be seen from Excel menu: Windows -> Unhide.
Wht must be the problem of file becoming automatically hidden? I hv even written the command of Xlsheet.visible = true but still it doesnt work.
Can u pls guide me to identify the problem ???
Thank you.
|
|
|
|
|
You could set the Workbook visible property to false for the workbook you don't want to see
objApp.Workbooks.Add()
Dim firstname As String = objApp.ActiveWorkbook.Name
objApp.Workbooks.Add()
Dim secondName As String = objApp.ActiveWorkbook.Name
objApp.Windows(secondName).Visible = False
|
|
|
|
|
Thanx for the reply.
Ya I hv done tht but see hiding the worksheet is not my problem. My prb is unhiding the hidden worksheet.
Is there any command in VB by which I can unhide the hidden excel worksheet ?
|
|
|
|
|
' To set the visible property to True on ALL sheets in workbook
Sub Un_Hide_All()
Dim sh As Worksheet
For Each sh In Worksheets
sh.Visible = True
Next
End Sub
|
|
|
|
|
Hi, i m building a html editor, all i want is how to insert a background image.
I have done it by replacing the tag with
but i wana somthing more professional... plz help me...
King
|
|
|
|
|
You also seemed to have posted this query in C# forum!
|
|
|
|
|
hi ,
I am having an HTML file Control and if i click add image button to save the image in DataBase, it is getting Save in Database in Format <Binary> Format.
when i am trying to retrive the Image from Database the Image getting Read but no images are displaying i do no Where the Issue is can any one help me to solve this problem
<code>
Private Sub btnSave_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSave.Click
intImageSize = fileUploadCTRL.PostedFile.ContentLength
strImagetype = fileUploadCTRL.PostedFile.ContentType
ImageStream = fileUploadCTRL.PostedFile.InputStream
Dim ImageContent(intImageSize) As Byte
intsize = ImageStream.Read(ImageContent, 0, intsize)
Dim sqlconn As New SqlConnection(ConfigurationSettings.AppSettings("BILL_CONSTR"))
Dim sqlcommand As New SqlCommand("sp_Image", sqlconn)
sqlcommand.CommandType = CommandType.StoredProcedure
Dim sqlParams As New SqlParameter("@PersonImage", SqlDbType.Image)
sqlParams.Value = ImageContent
sqlcommand.Parameters.Add(sqlParams)
Dim prmPersonImageType As New SqlParameter("@PersonImageType", SqlDbType.VarChar, 255)
prmPersonImageType.Value = strImagetype
sqlcommand.Parameters.Add(prmPersonImageType)
Try
sqlconn.Open()
sqlcommand.ExecuteNonQuery()
sqlconn.Close()
Response.Write("New Image Added Successfully")
Catch SQLex As SqlException
Response.Write("Insert Failed. Error Details are: " & SQLex.ToString())
End Try
End Sub
</code>
uSing Above I am Saving an Image to the Database and getting saved but
Below is the Coding to retrive . but no Images are getting Displayed.
<code>
Dim myConnection As New SqlConnection(ConfigurationSettings.AppSettings("BILL_CONSTR"))
Dim myCommand As New SqlCommand("Select * from Person", myConnection)
Try
myConnection.Open()
Dim myDataReader As SqlDataReader
myDataReader = myCommand.ExecuteReader(CommandBehavior.CloseConnection)
Do While (myDataReader.Read())
Response.BinaryWrite(myDataReader.Item("PersonImage"))
Loop
myConnection.Close()
Response.Write("Person info successfully retrieved!")
Catch SQLexc As SqlException
Response.Write("Read Failed : " & SQLexc.ToString())
End Try
End Sub
</code>
I am getting only the message retrived successfully but not image
sathimailin
|
|
|
|
|
To write an image out of your DB, you need to write the correct MIME type also, and you need to not write anything else. To show images in your website, and show them with other stuff on the same page, they need to be on the file system, that's why it makes more sense to store file paths in your SQL Server DB.
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 )
|
|
|
|
|
s it is an ASP.NET and Thanks TDDragon and christian for taking up this issue .
But is there any possiblity or not to store the image in DB and to retrive?
sathimailin
|
|
|
|
|
from what I can see there is nothing in you're code that would show the image. you have a response.binarywrite in there (I'm not too familier with this) wich I think will only show you lots of 1's and 0's.
If you have a form (wich I presume you have) put a imagebox on it then in code create a variable of the type image and fill it with the data that you receive. After that you can simply set the image property of the imagebox to the variable image.
on a side note:
sathimailin1 wrote: Dim myCommand As New SqlCommand("Select * from Person", myConnection)
I would recommend never to use * in sql statements. Instead put the names of the columns in there that you need and only those names (its better perfomance wise)
hope this helps
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistakes.
|
|
|
|
|
TDDragon wrote: you have a response.binarywrite in there (I'm not too familier with this) wich I think will only show you lots of 1's and 0's.
You're very wrong. The worst it could do is show a lot of text. A 1 or a 0 is in fact only going to be shown if the ASCII code for 1 or 0 is present in a text string.
A binary write is the right way to feed binary data through a browser, but only if the MIME type is also set, to tell the browser what it's trying to display
TDDragon wrote: put a imagebox on it then in code create a variable of the type image and fill it with the data that you receive.
Yes, if this is not an ASP.NET question ( which I assumed it was ), then the data can be put into a stream and a bitmap constructed from that. However, Response.Write and Response.BinaryWrite in the code, means it was an ASP.NET question. You can't put an image into a web page from a binary stream, it needs to exist on the file system.
TDDragon wrote: (its better perfomance wise)
I don't believe that's true in any meaningful way, unless the data table turns out to have extra columns than what you'd anticipate. I'd suggest the real issue here is that SQL should not be dynamically generated from strings like this, it should exist in a data layer.
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 )
|
|
|
|