|
I want to drag and drop stored procedures onto the designer so that I dont have to worry about user error with types and parameter names.
Cleako
|
|
|
|
|
You mean, you want to drag and drop an SP on YOUR COMPONENT and have the SQL code generated for you?
IMHO, the worst way to do it. The best, and easily supported, SQL code is written by hand, not by the designer.
I've never done it with drag and drop, other than to play with it, and I remember quickly abandoning it because it put objects and code crap all over the place in the form code. Precisely where it didn't belong.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Not the SQL code itself I just liked that it laid out the parameters for me that were already present in the pre-written stored procedure. Also, the only thing I used the component class for was for that purpose so it only contained DB calls and I wrote all of the code myself other than the Parameters.Add stuff.
Cleako
|
|
|
|
|
Well, you can try inheriting from Control and see what happens. I, personally, don't like the idea because of the extra crap your class has to deal with that it will never use, just so you can have some code written for you.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Are you saying you dont use wizards?
Im not a big wizard user myself but I do use a couple of the code generating options such as the drag and drop stored procedure. Ive noticed that many places on the net only show you how to do things through wizards.
What would you recommend for the data access class anyway? Ive seen some examples where the data access class just contains the Open and Close connection methods as well as the execute stored procedure methods and all the of the information is passed in from somewhere else. My experience has been to put all of the code the data access class uses cmd.Parameter("Name").Value = "Name" explicitly instead of a generic loop that adds the parameters. What do you think?
Cleako
|
|
|
|
|
cleako wrote: Are you saying you dont use wizards?
Never. I write all my database code by hand. I get far greater control and it's much easier to support.
cleako wrote: Ive noticed that many places on the net only show you how to do things through wizards.
You won't find that here.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I think I'm missing something very simple:
vb.net 2003, windows xp hmmmmmmm code description:
get the next jpeg file in a file listbox
display it in a picturebox i.e. picOther1.Image = Image.FromFile(sPath)
print it
move the file to another directory
next jpeg file...
The problem is I can't move the jpeg file because it's still in use. How can I close the file or disassociate the picturebox image from the file.
I've tried leaving it until all are printed (could be a couple of hundred) but still not able to do it.
Anybody...
Bruce
|
|
|
|
|
try:
if not isnothing(picother1.image) then
picother1.image.dispose()
picother1.image = nothing
end if
|
|
|
|
|
Don't use FromFile to load the picture. This locks the image file open for the life of the Image object that is created by it. See this[^] KB article for a workaround.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dave
thank you, that's just what I needed.
Bruce
|
|
|
|
|
Hi,
I am running vs 2003 and uploading a user defined excel sheet into an asp.net web form (vb.net code). The sheet consists of 21 records with about 50 columns. The problem is that I have the datagrid on a DIV tag for scrolling. But when you scroll it is painfully slow. Can someone suggest how I can do this so it won't be slow. Thanks.
|
|
|
|
|
A DIV tag tell's me this is an ASP.NET app. You have no control over the scrolling speed of the web browser. ASP.NET code runs exclusively on the server-side, generating HTML for the client. It's up to the client how to render the page image.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Yes it is an asp.net app with vb backend. So there is no way to make this run faster on a machine something. It is an internal application that is running terribly slow on every machine that I have tried including mine.
|
|
|
|
|
liona wrote: So there is no way to make this run faster on a machine something
No. There is nothing you can do in your code to speed the scrolling up. Once the browser has the page, that's it, your ASP.NET code is no longer running.
You said it was 50 columns wide?? Try providing another method of narrowing that down. If there's one thing I hate about web pages, it's scrolling side-to-side to read information on it.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I have created two files using .Net Setup wizard and they are:
1.)Setup.exe
2.)MyProject.exe
Now which one of these two i should double click to install my .exe file.
|
|
|
|
|
The Setup.EXE will also come with an .MSI file. Both files must be in the same directory for the installation to work. All you do is double-click the Setup.EXE to launch the install.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
i created a classLibrary in vb.Net 2005.Now i want to refer this to vb 6.0 for which i have to make .tlb file.
in vb.Net 2003 we create .tlb file very easily, but i dont know how i create it in 2005
if some one have any idea so please help me
its very urgent!
Thanks
Thanks
|
|
|
|
|
do you really need a .tlb file? you can put a com wrapper on the dll(class library) and then in vb6 you can do a createobject to it?
|
|
|
|
|
Could you please tell me how i can do that!
Thanks
|
|
|
|
|
Imports System.Runtime.InteropServices
<ProgId("Proj.XXXXXXX"), Guid("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"), ComVisible(True), _
ClassInterface(ClassInterfaceType.AutoDispatch)> _
Public Class XXXXXXX
End Class
=============
Proj = project name
XXXXXXX = class name
From vb6 = set o = createobject("proj.xxxxxxx")
-------------
get a new guid from vb.net ide
|
|
|
|
|
hi
i want to read an xls file from vb.net and then write it to a text file..
obviously using streamreader gives me garbled output..is it possible to get meaningful data or am i wasting my time?
a few pointers please??
|
|
|
|
|
in fact im more interested in getting the macro code from excel files..wat i mean is i am interested in reading the macro code for some purposes.
-- modified at 8:43 Friday 12th January, 2007
|
|
|
|
|
You're pretty much wasting your time using a StreamReader, of any other file operation. Office files, prior to Office 12, used a multiple-stream format that was very difficult to decode manually. Your only hope is to use Automation to start an Excel instance, have it load the XLS file, then you can use the automation interface to get that scripts you want.
No, I don't have any examples.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
|
i got a solution..i automated excel to export the macros,which i could read easily as any normal text files..
|
|
|
|