Jump to content
Xtreme .Net Talk

quwiltw

Leaders
  • Posts

    493
  • Joined

  • Last visited

Everything posted by quwiltw

  1. I guess it greatly depends on how you're creating your dataset. For example, I always inherit from a dataset and build the tables in code. For this I have a BuildDataTables() method in my inherited dataset that I call from the constructor. I also have separate friend methods that create single tables ( i needed them to be friend because sometimes I create them outside the dataset). The BuildDataTables routine looks something like this: Protected Overridable Sub BuildDataTables() Me.Tables.Add(BuildProductsTable()) Me.Tables.Add(BuildOrdersTable()) Me.Relations.Add(PRODUCTS_ORDER_RELATION, _ Me.Tables(PRODUCTS_TABLE).Columns(PRODUCT_ID), _ Me.Tables(ORDERS_TABLE).Columns(ORDERID)) End Sub If you're creating your datasets using the schema designer, I think it's as simple as just draggin another element on the designer page.
  2. Put a question mark in the SQL statement for the parameter, then at runtime add a parameter to the sqlcommand object. We're going down a similar path in this post if you're interested. http://www.xtremedotnettalk.com/showthread.php?s=&threadid=69500
  3. This is actually what I was showing you in my previous post. Here it is again. Obviously the Me.OleDbSelectCommand1 needs to be changed to whatever variable name you gave your select command. Me.OleDbSelectCommand1.Parameters.Add("@category", System.Data.OleDb.OleDbType.VarChar, 50).Value = "kids" Looks like you found it to me :) I think the folks here enjoy answering questions at all skill levels so keep'em coming:)
  4. For starters, lets change the select statement to accept a parameter which we'll determine at runtime. For example select id, title, rating from Movies where category=? Then add a parameter to your SelectCommand object. Something like, Me.OleDbSelectCommand1.Parameters.Add("@category", System.Data.OleDb.OleDbType.VarChar, 50).Value = "kids" get it to work like this, then you see where you can change the value of the parameter at runtime to whichever category is selected. Also, since all of the datasets have the same structure you really don't need multiples.
  5. Oracle provided some samples when they released ODP.NET. You might want to check them out. http://technet.oracle.com/sample_code/tech/windows/odpnet/content.html Also, the docs for ODP.NET http://otn.oracle.com/docs/tech/windows/odpnet/content.html
  6. It isn't clear what Textbox1 and textbox2 are for. Are they two separate log entries? What is button1 for on the new comm log input form? btw. having variable names the same as keywords, like your "New" is not so good.
  7. I wouldn't want to maintain it. Why don't you do as divil suggested and provide some more details of the project and let someone help come up with a more appropriate UI design?
  8. You're adding an array of strings but it appears that the DailyID column of the dataset is set to be an integer. Have you checked that out?
  9. Of course this depends on what you want to do, but I think an MIS degree with a minor in CS is a good idea. That way you've got enough CS courses so that you can intelligently talk about complex data structures and solving complex problems, but you've also got the business foundation for when/if you decide you'd like to move into project management. The CS courses beyond the minor are so specific (and usually low-level) that you'll likely never use them anyway. For example, I ask people to program against a database, not program a database; I ask people to use a compiler to compile their code, not write the compiler. You get the point. I think that these courses are interesting but few people reallly get to solve these sorts of problems. By getting a minor in CS you get to learn some advanced data structures and algorithms that may prove useful.
  10. YOu shouldn't neeed multiple dataadapters and I doubt you need multiple datasets, maybe you could post the code your using for populating one of the selectcommands on one of the dataadapters and the database model and we'll figure out how to parameterize it?
  11. This question is probably more appropriate for this site's sibling: http://www.visualbasicforum.com and the ASP forum specifically. When I'd have problems like this that didn't produce an error, I'd just Response.Write the SQL string then copy and paste it into Access and make sure it *should* return results before you go too far in the error tracking process.
  12. The actual connecting part should be the exact same code. Presenting the DB content through a console interface could be somewhat challenging though.
  13. I don't think so in VB.NET it's built in to Access. My guess is that Robby has it in some utility module that he's implemented himself. Otherwise maybe I've just not found it in .NET yet. Should be simple enough to write though.
  14. It's a function that evaluaties the parameter to see if it's null, and if it is, it returns the value of the second parameter.
  15. if you do any db work. I've never messed with it but i suspect that if you're not going to be debugging your stored procs, UDFs, triggers, db stuff from within Visual Studio.NET then you could probably safely do away with it. of course, my guess is worth what you paid for it:) if it ain't hurting you and you're not under strict security constraints i'd leave it.
  16. you can debug your stored procs, UDFs etc, with visual studio.net. the program that does this runs under this account as I understand it.
  17. quwiltw

    GUID's

    I'd want to know more about the data but generally... create table tblUsers ( userID int, userName varchar(50), password varchar(24) ) create table tblUserData ( id int, userID int, someData varchar(200), someData2 varchar(200), someData3 varchar(200), etc... (200), ) to get data out for a particular user, use something like SELECT * FROM tblUserData JOIN tblUsers on tblUsers.userID=tblUserData.userID where userName='quwiltw' or, more likely you'll maintain the foreign key userID and will never actually need the join. Obviously, I've had to make a number of assumptions in my answer but hopefully it'll get you on a better path.
  18. quwiltw

    GUID's

    fair enough. if you're interested post up a description of your problem and I'm sure folks here can help with a good database design that doesn't include dynamic creation of tables.
  19. quwiltw

    GUID's

    it's strange (and very wrong IMO) to create a whole new database table with identical data models on the fly for every user. ideally, your data model would not change once it's stable. i know of no dba that would let me assume this in my software design. why not just create a tblAccounts that is in a one-to-many relationship with tblAccountDetails? That'd be a fairly standard approach to what it sounds like you're doing.
  20. quwiltw

    GUID's

    I was tracking with you til you said this. If you're saying what I think you're saying this is *really* strange. Either way it's: System.Guid.NewGuid As in: Dim g As Guid g = System.Guid.NewGuid
  21. There are a number of tutorials on line but... if I were you I'd just use the DataAdapter wizard to create all the command objects needed, then just look at the generated code to learn from it. You'll instantly see opportunities to improve it. btw, my guess is that you have been able to fill a dataset with a dataadapter, not the other way around:)
  22. Admittedly wild guess, you might try the ActiveWindow property? as in, objWordInstance.ActiveWindow
  23. I must admit I know nothing about Dreamweaver MX. I guess it doesn't have a collection editor built into the properties window? If Dreamweaver gives a way to edit code behind pages, you could always just do it on the page_load event in code or if this is hardcoded you could add a selected attribute to one of the items in xml. Why don't you post some relevant code so I can get an idea of what you're working with inside Dreamweaver?
  24. yeah I missed the private to public change. glad to hear you got it working.
  25. Public Class MDIForm1 Inherits System.Windows.Forms.Form Private tmpLogin As frmConnexion (...) Private Sub mnuConnect_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuConnect.Click tmpLogin = New frmConnexion() 'Add a reference to the parent since you're using ' ShowDialog, I don't think you can do it using the ' normal mdiparent/child relationship. tmpLogin.tmpMDIForm = Me tmpLogin.ShowDialog() (...) In my frmConnexion : Public Class frmConnexion Inherits System.Windows.Forms.Form Private tmpMDIForm As MDIForm1 (...) BUtton1_click 'commented new stuff. if it helps, your hunch was correct. ' your creating a whole new form that never gets shown. 'tmpMDIForm = New MDIForm1() tmpMDIForm.EnableMenus() Me.Close() (...)
×
×
  • Create New...