|
Hi,
On your client access install you should find the OLEDB provider for AS400.
This is a much faster library to be using for accessing the AS400, rather than ODBC. I'm currently at home so I don't have the exact connect string. But it's the Provider=IBMDA400
I'll post the proper connection string in the morning, then is also a little trick to setting up the Client Access Install, so that you can pass through your Username/Password in the Connection string rather than having client access popup a Dialog asking for the username etc. CWBCFG or similar to that once again ... in the morning...
|
|
|
|
|
Hi
Thank for your help. The bad news is my client don't have client access to link to AS400, they have Rumba. The good news is I download a evaluation copy from Hit OLEDB400 (www.hit.com) And now this connection works. Thank everyone for your support.
Johnny Lizardo
|
|
|
|
|
HELP
I am writing a vb.net app to log in to a remote web site, sift through the menu href links and extract useful information. I have the program connecting to the remote url, loading the page into a string, parsing the string and forming an array of url's containing the information pages. This part works well.
Unfortunately the second level pages require a login process which redirects to a login asp page, posts username and password values to the server and sets cookies on the local machine. My code returns an exception - the remote server returns a (404) not found" on the
I am having trouble finding example code for getting around basic problems:
- detecting whether it has been redirected
- posting the username/password values to the login page
- handling the server's cookie
Any suggestions????
|
|
|
|
|
Maybe I can help... I worked on a MSNP9 implementation and used HTTPS authentication, maybe it will not differ much from what you want to do...
Send your code and I'll see what I can do
greetz
*Niels Penneman*
Software/Dev Site Personal Site
|
|
|
|
|
Hi there,
I'm really looking for something like the CBitmapSlider (http://www.codeproject.com/staticctrl/CBitmapSlider.asp), which is perfect, but in VB. I'm only a poor student so can't afford to buy anything and am too new to vb.net to try coding my own controls (tho some good tutorials may also be a help..)
Cheers in advance
|
|
|
|
|
Hi,
Is it possible to enumerate an Enum. For example...I want to add all the possible values of an Enum into a combo box so that the values can be selected.
Enum MyEnum
Val1
Val2
Val3
End Enum
...
Nursey
Then something like
for each lValue in MyEnum
combobox.items.add(lValue.ToString())
next
Thanks
|
|
|
|
|
Public Enum flag
red = 1
white = 2
blue = 3
End Enum
For Each flagcolor In [Enum].GetNames(GetType(flag))
MsgBox(flagcolor)
Next
|
|
|
|
|
Many thanks for such a complete and details response my friend.
You inspired me to this..
MyCombo.Items.AddRange([Enum].GetNames(GetType(MyEnum)))
Combo populated with all enum values in one line of code.
Thank you for your help.
Nursey
|
|
|
|
|
Ok, its true I have only one tip, not the usual 1001 tips for VB 8-)
I have been heavily developing my Theme control system and need flicker free drawing on the surface of a panel. The solution was so sweet I just thought I would share it for two reasons. 1) See how simple things are to do in .NET, 2) I can't see a forum for sharing little nuggets...oh 3) was going to be you can see what a God I have become at this stuff in only 2 weeks (BOW MORTALS!) hahaha
' Create a panel whose Graphics object is double buffered to eliminate flicker when drawing
Public Class BufferedPanel
Inherits Panel
Sub New()
SetStyle(ControlStyles.AllPaintingInWmPaint Or ControlStyles.DoubleBuffer Or ControlStyles.UserPaint, True)
End Sub
End Class
Jeez, that was a big build up for such a poxy one line of code, but there you go. If you want flicker free drawing, just inherit a control and stick a SetStyle on it. In the Paint event of the BufferedPanel you draw anything you want to and its flicker free.
Thanks for reading!
Nursey
|
|
|
|
|
Hello everyone!
I'm trying to debug a vb.net project and it is not working like I expected.
In the vb6 I would open the project set my break points and run it.
When ever the line that has the break point was called from asp page running locally
it would stop. It does not work the same in vb.net
Can some one tell me what am I doing wrong or a where I can find a good article about debugging
Class library project.
Thanks in advance
Iluha
|
|
|
|
|
I think I'm going mad. I created a db, made a form for the primary data entry functions, then tried to create a new recordset in a module associated with the form. The form is for entering a timestamp when a valid user checks in, and part of the challenge is to verify that the user has entered a valid name and password (from a separate table) before allowing the update to the primary table. After days of trying to make it work I finally got an intelligible error message informing me that the Database and Recordset types are not recognized. The code is essentially straight out of the online reference manual, to wit:
Dim db As Database
Set db = CurrentDb()
Dim rst As Recordset
Set rst = db.OpenRecordset....
Searching through Help for this problem leads me to the statement that the Data Access Objects are not installed; Add them to your Visual Basic Project References. This isn't a VB Project, just a simple Access 2000 application. There are no project references to set, and it's inconceivable that a database product would not install the type definitions required to work with databases! I've reinstalled Access 2000 three times so far, and applied SP3 to the installation. I haven't a clue what to try next. Any suggestions?
"Another day done - All targets met; all systems fully operational; all customers satisfied; all staff keen and well motivated; all pigs fed and ready to fly" - Jennie A.
|
|
|
|
|
If I recall correctly, you should still have a menu option for References under Tools in the VB editor that appears when you are editing your module. Go in there and make sure the reference to ActiveX Data Objects and DAO have not gotten unchecked somehow.
Datagrid Girl
|
|
|
|
|
Good call - they have been unchecked. Along with a few hundred others, and not a one of them has any descriptive information. Multiple versions of ActiveX, and DAO... What a farce. Thanks for the clue - I got the Database and Recordset objects initialized. Now I need to figure out what it's telling me with a popup that says "Too Few Arguments - 4 Expected" without in any way identifying where the error occurred. Another day of single-stepping is ahead, I suppose.... Thanks!
"Another day done - All targets met; all systems fully operational; all customers satisfied; all staff keen and well motivated; all pigs fed and ready to fly" - Jennie A.
|
|
|
|
|
PLEASE HELP
I have a requirement to send messages over TCPIP. The format of this message is 2 bytes for a binary length of the entire message, 6 spaces and then the message. The length of these messages can be as least 66 bytes and up to 5500 bytes.
I had this working in VB6, but now need to re-write it in .net. The code I used in VB6 is as follows:
Public Function buildIPheader(lgth As Long) As String
'set the length of the TCP/IP header
'add 8 bytes for the IP header
lgth = lgth + 8
'IP Header = 8 bytest, first two bytes are length of record, last 6 bytes are unused.
'compute the length into binary format
Dim comp1, comp2
comp1 = lgth \ 256
comp2 = lgth Mod 256
'2 bytes binary for the length and 6 bytes spaces for future use
buildIPheader = StrConv(ChrB(comp1), vbUnicode) & _
StrConv(ChrB(comp2), vbUnicode) & _
" "
End Function
As you know the chrB and vbUnicode are no longer supported under .net. I have tried the encodeing getbytes method but that creates an array which I can't use.
Does anyone know how to do this using VB.NET??
|
|
|
|
|
Why do people ALWAYS FORGET that unicode takes TWO BYTES for ONE CHARACTER?? If you would change the encoding from ASCII to Unicode in the example below, you would only get one char and six spaces... And if you write new programs in .NET i suggest you use UTF-8 encoding (1 OR 2 bytes / char)
Use ASCII encoding if you want only 8 bytes:
Public Function buildIPheader(ByVal Length As Integer) As String
Length += 8
Dim comp1, comp2 As Byte
comp1 = Length \ 256
comp2 = Length Mod 256
Return System.Text.Encoding.ASCII.GetString(New Byte() {comp1, comp2}) & " "
End Function
However, in .NET you should (better) work with byte arrays and then the code looks like this :
Public Function buildIPheader(ByVal Length As Integer) As Byte()
Length += 8
Dim header(7) As Byte
header(0) = Length \ 256
header(1) = Length Mod 256
System.Text.Encoding.ASCII.GetBytes(" ", 0, 6, header, 2)
Return header
End Function
And as the other six bytes are unused, I wouldn't even set them, or set them to zero
greetz
*Niels Penneman*
Software/Dev Site Personal Site
|
|
|
|
|
Hi
I would like to get the source of HTML doucmnets for the net (like from cnn site) in to string .
Can any one help and tell me how to do that in VB6
Thnaks
MXG
|
|
|
|
|
Use Microsoft Inet control? or try HTTP request with WinSock, but I guess that is harder to do...
greetz
*Niels Penneman*
Software/Dev Site Personal Site
|
|
|
|
|
wininet.dll
InternetOpen
InternetOpenUrl
InternetReadFile
I have a small sample i wrote years ago. let me know if you want a copy.
|
|
|
|
|
I want to access my MDI forms menus from a child form.
like I want to enable all the menus in my MDI form(which is a startup form) after the user
logs in successfully.
How can I access my Mdi forms menus/controls from a child form
Thanks
tasnim.
|
|
|
|
|
If this is VB.NET, use the Form.MdiParent property. If this is VB5 or 6: call the form by its name
greetz
*Niels Penneman*
Software/Dev Site Personal Site
|
|
|
|
|
dear all,
how to draw the waveform of a wave or mp3 file using visual basic....i want to draw the waveform for a playing wav file and also for a static wav file.
Any links tht can help me to do this?
Regards
rIsHaBh
|
|
|
|
|
|
Hi.
I got a problem getting a program i wrote in VB.net to work with excel 2000.
It works well with excel 2002.
The error occures within this code:
ExcelApp = New Excel.Application()
ExcelBook = ExcelApp.Workbooks.Open(ExcelFile, False, True)
ExcelSheet = ExcelApp.ActiveSheet
This is the error i get:
"Object reference not set to an instance of an object.
interop.excel
at Excel.Workbooks.open(String Filename, object Updatelinks .......all the optional attributes.......) "
Odd Magne Vea
|
|
|
|
|
Have you tried to re-import the libraries you are using? Because interop DLLs probably need to be regenerated to work with another file version...
greetz
*Niels Penneman*
Software/Dev Site Personal Site
|
|
|
|
|
Hi, My name is Greg Kelley. I'm a student in college. I'm currently studying Visual Basic.Net. I have a project that I'm working on, and I'm having some problems bringing it all together.I need to create a program that contains the following:
Menu System Required
Merge(2)Files together
Sort the File(First six characters)
Encrypt the file
Decrypt the file
Note: The file must contain 10 records(80 bytes long)
If you could asssist me in this , it would be greatly appreciated. If so, I need to do this in its simpliest form.
Thanks,
Greg Kelley
Greg Kelley
|
|
|
|