Jump to content
Xtreme .Net Talk

bri189a

Avatar/Signature
  • Posts

    1014
  • Joined

  • Last visited

Everything posted by bri189a

  1. On that note a lot of people have there DAC/DAL (Data Access Component/Data Access Layer) in a whole seperate project so that the DLL could be used in a ASP or Windows application or future applications, that way if something changes you just redeploy the DLL instead of the whole APP.
  2. Copy any ddl's, web.config, .aspx pages and .ascx part of any user controls to the folder your web host has designated for you. Make sure they have that folder set up to run apps. So you're an AS400'er...and assuming the link in your signature only goes to a 'this is the future site of...' I'm assuming you're building that site...do they have any 'I don't already know' RPG web sites out there... like RPG 101 or something. Everything I find is either moving someone up from RGP IV to ILE or 3 to 4, or is the opposite end of the spectrum that tells me how to program but doesn't give me any real knowledge or RPG. IBM web site is worthless unless you already know the lingo, so the little I have to do on the 400 is luck at best. Any help or tutorial web sites you know of, let me know...thnks.
  3. the machine ASPNET account is a machine account, you can't logon with it. If there is a function in the macro you want, just copy the macro, translate it to VB and then put it in your code behind.
  4. I'd say that's probablly the problem, the reveiving host address should be user in the exchange system...john.doe, or something like that, using the dll can you set a 'from' address?
  5. Is the System.Web.Mail.Smtp class not doing what you need? As far as your problem there may be a differance between the two operating systems in the way they work, try seeing if you can use just .NET to do it using the specified namespace above, if .NET doesn't have the same issue then it's probably a differance in dll versions. That's my best guess.
  6. From the examples I've seen on the web it (VBS) looks similiar to when we use a DirectorySearcher object and I think what they think is 'binding to a specific server' is just what we set the rootDSE to with a DS object, except I'm only using the DE (DirectoryEntry) object because I already know the where the objects lye that I want - to your question, haven't seen any 'code' from the LAN group yet... Anyway, I don't know enough about it, and even if I did I need a white paper or something other than 'my buddies on the message board' said so, if you know what I'm saying. They want to connect to a specific server so that they can measure performance and know that this 'particular' server is the server that is used by application X to query AD which is understandable from their point of view. The problem is that we're not making headway because they only know AD from the world of VBS and I only know it from the world of .NET... Thanks PD for any advise you got on the matter.
  7. Appreciate your comments...not having a problem talking with AD, I'm already doing that, already using impersonation. What I was asking is that I need to specify the Active Directory Server that I query against. LAN says I can do that... they say they can do it in there VBS files... I think it's a terminology difference, that's what I'm trying to figure out. What do you mean GC works in a pre-cached way? And what do you mean by: Do not use the object from toolbar for DirectoryEntry, do it manually! What toolbar object? I do everything in code...I wasn't even aware there was a tool in the toolbar for connecting to active directory and can't seem to find one either.
  8. (this is all ASP.NET related) I've never messed with AD using VBS before, but apparently the LAN team has and everything they do they can 'bind' to a specific server. Now in my limited experiance using the DirectoryEntry and DirectorySearcher object there is a flag called ServerBind that you can use when connecting but MSDNs documentation on that is vague. And by that I mean what do they mean if you have a server specified in the LDAP path and if you do have it in your LDAP path does that mean you are already binding to a specific server? Example: LDAP://CN=Happy Gilmore,OU=Comedy,DC=movies,DC=entertainment,DC=com Aren't you specifying the movies.entertainment.com domain already? Or do they mean putting the server at the beginning of LDAP path which seems is what you have to do whenever you're passing in the username and password as part of the DirectoryEntry connection: LDAP://movies/CN=Happy Gilmore,OU=Comedy,DC=movies,DC=entertainment,DC=com I don't know why I have to specify the domain name at the beginning like that when using user name and password, but I do...otherwise I get a Server not found error. The first LDAP will only work if I have the impersonate attribute set to true in the web.config file, interestingly enough the second will work with impersonation also but it seems a lot slower. So anyway, to my point/question...we can't move forward until we can tell the LAN guys what server our AD 'queries' are going to...since my rootDSE is the entire path as above, or I'm not using DirectorySearcher and going directly to the entry because I know where it's at, I don't know what to tell them and can't find any documentation to support my theory that with the LDAP paths above I am specifying a server (movies). Any help would be GREATLY appreciated. Thanks!
  9. In old school you did something like (again can't remember that far back for sure): While rs.EOF = false Response.Write(rs("UserName")) rs.MoveNext End While In .NET you can: For Each row as DataRow in ds.Tables(0).Rows Debug.WriteLine(row("OrderNumber").ToString()) Next or For i as Integer = 0 to ds.Tables(0).Rows.Count - 1 Debug.WriteLine(DirectCast(ds.Tables(0).Rows(i)("OrderNumber"), Integer).ToString()) Next ---But preferably you want to go directly to the record: (If you have a primary key can be one key or compound key - see MSDN for more info) Dim row as ds.Tables(0).Rows.Find("54") If Not row is Nothing Then Debug.WriteLine(DirectCast(row("OrderDescription"), String) End If (Or if you want to get a sub set of rows or don't have a primary key) Dim rows as DataRow() = ds.Tables(0).Select("Cost=45.17") For i as Integer = 0 to rows.Count - 1 Debug.WriteLine(DirectCast(row("ProductName"), String)) Next I've shown a few of the common ways people do things...sounds like you might want to check out Dino Espisito's book on ADO.NET - it's worth the money. Things become even easier when you have a strongly typed dataset when trying to find something.
  10. Didn't follow your question because I've actually forgotten all of VB6 data access...wow... anyway to get the field of a row: ds.Tables(0).Rows(5)("OrderNumber") If you were speaking of relationships then: ds.Tables(0).Rows(5).GetParentRow("RelationshipName", RowState.Current)("UserName") I'm way off on the syntax above, but it's along those lines, I'm almost always use strongly typed datasets (runs faster, get intellisense, lots of other advantages), and I've been extremely spoiled by them because I can: ds.OrdersTables(5).CustomerRow.CustomerName Of course none of this has the proper checking that you need to have, but it's just an example, hope it helps.
  11. Change: ElseIf lbxWkid.SelectedItem.Selected = True Then To: ElseIf Not lbxWkid.SelectedItem Is Nothing Then Or more commonly seen you could: If Not lblWkik.SelectedIndex = -1 Then 'Code for what to do when there is a selected item (-1 means no selection, so 'thus if it is not -1 then an item has been selected End If Both will work, it's just a coding style/preference thing. Also you should always have your most common condition in the 'If' clause and non-common conditions in the else clause...so since your selection box will probably have a selection more often than it does not, the part that goes in the 'If' clause would be the checking for whether there is a selected item or not, and the else clause would be the logic for what to do when there isn't something selected. There's no rules on that, just something that most people will say is good practice/coding. What you originally had is telling .NET to test for whether the selected item in the list is selected (which a selected item would be), you want to see if there is a selected item.
  12. I think the best way is to remove the security demand (that may be what is causing your pop up window...I think) and execute normally in a try...catch statement and catch the security exception and go from there and do all of your registry accessing in the try part. It looks like you were going down that road already,... and .Net security gives a lot of people headaches. Good luck.
  13. Using reflection you can get the declaring type, using the Activator object you can create an instance of that type, but how can you get the instance of the object that declared a class from within the class? Is it possible?
  14. So today I logged in at work and now in my immediate, watch or any other debug window anything that has a value such as myArray.Length - instead of the value showing up as 1 or 5 or 315, I get the value in hexadecimal: &H00F1221 or &HF000000 etc. Don't know what I did to do that but anyone got any ideas short or re-installing because convicing desktop support to reinstall an app that appears to be working as far as they're concerned will be an uphill battle....if only I had the permissions!
  15. Most people have done what Robby has done, either A because they don't know about Wilson Master Pages and some of it's 'competitors', or B (such as I) find Wilson Master Pages (and it's competitors) terribly cumbersome and over architected and design there own that work just as well if not better and are easy to implement... you could use A, but seriously, take the time like me and Robby did and do B until you get your hands on 2.0 - it's good experiance... in fact I like my own version more than I like 2.0 version, I think I made it easier to implement than that...but of coarse I biased... Definitely don't do frames, if you go the user control route make a static function that you can call at each page load that will load the control for you at the top and bottom, that way if you have to change things in the future the impact of those changes will be minimal, whereas if you drag and drop them onto each page you're looking at a lot more of an impact.
  16. This might be better posted in the windows section as ASP typically doesn't mess with it...haven't tried it and I'm sure someone can shoot me down, and this definitely I don't think would be a preferred approach, but off the top of my head, create a richtext text box object...think there is one of those in the windows forms (don't mess with forms much)...assign the rtf text to your value and then pull the text value, not even sure if those properties exist for that control but if I was in the situation that's were I'd start. There maybe a class in the System.Text namespace that may do it too or somewhere else, but at least this will give you some ideas to look at until a forms guru takes a look at your post.
  17. Rob - while I agree with the concept I respectively don't agree that it's always the best scenerio. I have a app like his that only has a few items in the ddl, it can show up to 1000 rows and is intranet based, the only thing the user can change is the value in that ddl, everything else is read only...the ddl at most will hold 10 items...imagine it as looking at list of all 'items' and the ability to assign an item to a category and the possible categories are in the ddl... to make the user hit edit, change the value, then hit something to get out of edit mode it a lot of extra steps for the user, lot of extra code too... agreed? Of coarse we put in 'batch changes' to make life easier on the user too...but that's another subject... But like I said I do agree that in several situations it might be better to have it go to edit mode but I think its really application specific.
  18. Yeah, ODBC when used with AS400... no built in connection pooling there...really wish it did though, let me tell ya!
  19. How big is the data...the server may be reclaiming space because it's too large.
  20. Rob...out of curiosity why wouldn't he bind and display in select mode? If you're saying 'Edit' mode as I think you are...see list, select item in list, see item in Edit template?
  21. DBA's don't like connections tied up for no reason. Open and close only when needed. Use disconnected data as much as possible (DataSet).
  22. Answer: If anyone runs into this you can't put the picture in your web page the easy way, you have to do the bitmap in memory stream method: //For old MS pictures in Northwind System.IO.MemoryStream ms = new System.IO.MemoryStream(); // 78 is the size of the OLE header for Northwind images. int offset = 78; byte [] pic = (byte[])ds.Categories.FindByCategoryID(Convert.ToInt32(Request.QueryString["ID"])).Picture; ms.Write(pic, offset, pic.Length - offset); Bitmap bmp = new Bitmap(ms); Response.ContentType = "image/jpeg"; bmp.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg); ms.Close(); Thanks to: http://www.ftponline.com/vsm/2002_07/online/hottips/esposito/ for the information...I never knew Northwind was originally access and converted to SQL...I thought it was the other way around. Hope this helps someone in the future.
  23. Thanks, hopefully I can get it to work.
  24. I'm doing a demo and for the life of me I can't figure out what kind of image file Microsoft filled the Picture field of the Categories table in the Northwind database, I started with what I thought would be it...bitmap, but nope, tried the usuals...jpg, gif, tiff, but still is rendering the broken image icon when I'm databinding in my web page (and yes I'm doing BinaryWrite)...so I can only conclude I'm either A) using the wrong content type string, or B) they are using some off the wall format. Any suggestions? Thanks!
  25. let me throw my stick into the hornets nest
×
×
  • Create New...