npasma 4 Light Poster

Well well, look what we have here:

http://www.informationweek.com/story/showArticle.jhtml?articleID=173601761&pgno=1

Just a little taste:

"In other Sony BMG news, a slew of security firms warned Thursday of the first appearance of malware that uses Sony's rootkit to hide from anti-virus programs.

Dubbed "Backdoor.Rycos" by Symantec and "Stinx.e" by Sophos, the Trojan arrives as an attachment to an e-mail purportedly from a British business publication. If the attachment is launched, the Trojan copies itself as "$sys$drv.exe" to the hard drive. Any file beginning with "$sys$" is automatically cloaked by the XCP rootkit.

As early as a week ago, hackers were already discussing ways to use the XCP rootkit, but Stinx.e is the first proof of their work.
"Sony's DRM copy protection has opened up a vulnerability which hackers and virus writers are now exploiting," said Graham Cluley, senior technology consultant for Sophos, in a statement Thursday. "We wouldn't be surprised if more malware authors try and take advantage of this."

The Trojan opens a backdoor on the compromised PC, and takes commands from its controller to, for instance, install additional files or delete data."

npasma 4 Light Poster

Danny, what are you talking about?! Do you know what a rootkit is?? Have you seen anything use a rootkit that wasn't in some way spyware/malware related? Mark Russinovich defines it very well when he says, "rootkits hide files, Registry keys, and other system objects from diagnostic and security software, and they are usually employed by malware attempting to keep their implementation hidden." I don't care if Sony's intentions are as pure as Mother Teresa, we can NOT allow major businesses/corporations to think they can infinge on the privacy/rights of an individual by preying on users who are not technically knowledgable enough to prevent their own machines from being invaded without their own knowledge.

The possibilities for this feature to be exploited by malware creators is by itself enough reason for this kind of practice to be shunned, and believe me Sony won't be the last to try and pull something like this off. If this is "nothing serious" then why is there already one class-action lawsuit against Sony BMG Music Entertainment filed in California, and more expected to be filed soon?

Forgive the business rant, but isn't it a bit ridiculous how invasive and aggressive large corporations have become? And how we've given the abstract concept of the corporation "rights" as if it were a human being, instead of protecting the rights of the actual people who get pushed around by businesses such as Sony on a daily basis? Do some research, if you think I'm extreme. …

npasma 4 Light Poster

Just a quick note, you mentioned- "Perhaps it is time to look at McAfee, Panda, and/or Zone Labs for additional layers of security."

Granted, maybe Symantec is flawed, but oftentimes the "American" solution is that if one antivirus program is good, 5 must be better. This leads to a lot of conflicts between software- in fact, often the programs are so busy fighting with each other than common viruses go untreated.

Better to find one solid antivirus program, and a good compatible anti-spyware program than to have a half dozen programs conflicting with each other.

As for spyware, you still can't be the free cost and effectiveness of "Spybot Search and Destroy" at:

www.safer-networking.org

Keep fighting the good fight, y'all!

npasma 4 Light Poster

Alright all you Grammar Geeks- see what you think of this:
Short-hand typing and leet speak is roughly equivalent to slang speach in normal English speaking. It can be permissible, as long as it stays in the right context.

What is the right context? Well its NOT in business conversations, or serious web forumns in which proper communication is imperative to getting something important accomplished. Companies hire technical writers for a reason- its an important skill.

But lets give leet speak a break when it stays where it belongs- informal IM, text messaging to save characters, and my personal favorite: online gaming. (Granted, when I'm texting during gameplay, my college degree becomes virtually indiscernable!)

Correct me if I'm wrong, but I think- ( leetspeak : formal typing as slang : speach ) is a fair analogy. Just as some people can't speak properly when attempting to communicate formerly, also some people can't type properly in the same way, which is problematic, but by no means a new thing.

In short: wanna be informal? Go nutz! Need to get something important done? Be explicit and speak clearly.

npasma 4 Light Poster

OK, Im gonna hook you up, but DON'T CHEAT SUCKA! If u do, you'll end up having to reteach yerself all your crap after you graduate, like me. Believe me, it sux to teach yerself. Especially if you're already an idiot. ANYHOO, here is a basic sample chat room made with ASP.NET. Its very, very basic, and lacking a lot of typical features, but it should get you started.

Everyone should understand that this code is NOT mine, but an example extracted from: "ASP.NET for Dummies" (like me :mrgreen: ), by Bill Hatfield. Good luck, have fun, don't suck!


The Café

The Café is a complete, real-time chat room. Users sign in and choose a nickname to identify themselves in the room. From there, they enter the primary window, where they can type messages and see messages typed by others. There's even a list down the right-hand side of the window of all the users currently in the Café.

npasma 4 Light Poster

Oh yeah, its possible.

Check this out, I believe it will answer your question:

http://www.c-sharpcorner.com/Code/2002/July/EditableListBox.asp

npasma 4 Light Poster

P.S.- If I just gave you an answer to a homework problem, you owe me $20. :evil: :p :cheesy:

npasma 4 Light Poster

Optimistic vs. Pessimistic Locking

OK Eddy, here goes:

Locking is a method used to protect records that will be accessed by multiple users so that concurrency errors do not occur (when multiple users change records near simultaneously resulting in inconsistencies).
"Locking" refers to preventing access in some way to the file in order to protect it while a user is making an update.

Optimistic locking is better to use when the likelihood of a update conflict is low. This is usually the case when the normal action is adding a record, like in an order entry system. Pessimistic locking is used when the likelihood of such a conflict is high.

Pessimistic locking anticipates contention for the same record, preventing users from selecting a record for editing when another user has already done so. This is often done by relying on the database itself. Most relational databases use this method, only each may use a different standard for the "granularity" considered when making a lock. As an example, SQL Server 2000 locks single rows, while others may lock the entire page or table containing the record to be changed. A drawback is that this type of locking requires that you remain connected to the database the whole time, which can be a bit much to ask. Also, this type of locking can back up on users waiting to access a given record.

Optimistic locking allows multiple users to access the same record for edits, counting …

npasma 4 Light Poster

Ignore him, he's just trying for a red bar for his reputation. ^^

server_crash = :twisted:

server_crash commented: Maybe you are too +0
npasma 4 Light Poster

typhoon-->hurricane

hurrican --> New Orleans

npasma 4 Light Poster

I work tech support for an electrical engineering company and over the last few years we have switched from Tosiba and Gateway to almost all Dell laptops for employees. I am very impressed with their service while the warranty is in place. (Barring a bizarre event where one guy went through 4 motherboards in 2 months, but they kept replacing them without giving me too much crap) :D

Honestly, I hope your wrong about the long term life of the machines, we buy 3 year support on all our machines, but I'd like to see them last a tad longer. I'll let you know how things are going in about 1 1/2 years. ;)


P.S.- If your mouse takes off by itself (in response to earlier post), update your point stick and mouse drivers and if that doesnt work disable the point stick and see if that stops it (it usually does), if so take off the keyboard and fiddle with it, then give up and have a dell tech replace the keyboard AND the palm rest just to be safe.

npasma 4 Light Poster

OK, one more quick DDR comment- I have size 13 feet, and the arcade machines have buttons that are recessed in metal. MY FREAKIN' FEET DONT FIT! Has anyone else had the problem, or does my tippy toe accuracy just suck?

npasma 4 Light Poster

Zephyr --> Typhoon

npasma 4 Light Poster

Yeah, I admit my method is a bit unusual. Here's my rationale: If a user enters a partial value into one of the text boxes, the InStr method will pick up on that and return all values containing that string portion. As for the lack of the equals symbol, the greater than symbol works just as well in this particular situation. Its all seems to be legal! Different strokes for different folks I guess. :)

Glad to here it.

But it is a new one on me that you have an SQL WHERE clause without an "equals" sign. Your method is a pretty niffty way of doing it, I applaud you on that. :cool:

npasma 4 Light Poster

OK, well first of all, I would proudly like to announce that this problem has been officially solved- due to some changes in page load and some clever use of session variables. I now have a program that sucessfully searches and updates the database. All I have to do now is finish the insert functionallity for new records and I'm done. If anyone would like to see the finished code, just let me know and I'll post it.

And Paladine, whoa dude- about that select query not being valid after the where- look again. The if structure I created changes the query dynamically based on which categories the user chooses to search by. Each if may add on some code to the query followed by an AND. The last if statement uses LEN to cut off the final AND. For instance, if you search by Software Number, the "WhereClause" as I named it looks something like this:

"Where InStr([Software #],'1A 0001')>0 "

Anyhoo, I thought it was fairly clever if I do say so myself. So yah, thanks for your help everyone. Im not done yet, I need to get back to work- but feel free to request a posting of whichever "fixed up" methods u might like to see and I will post them. Good luck all. :cheesy: :cheesy: :cheesy:

npasma 4 Light Poster

I took your advice, and made a special session variable called "dsTest" to use at the end of my search button click method, and then I used dsTest in the else statement of the page load method.

The result is this:

Value cannot be null. Parameter name: dataSet
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentNullException: Value cannot be null. Parameter name: dataSet

Source Error:


Line 159: Adapter.SelectCommand = New OleDbCommand(SelectStatement, Connect)
Line 160: Adapter.SelectCommand.Connection.Open()
Line 161: Adapter.Fill(dsSoftware, "[SOFTWARE DATABASE]")
Line 162: softwareGrid.DataSource = dsSoftware.Tables("[SOFTWARE DATABASE]")
Line 163: Session("dsTest") = dsSoftware


Its claiming the data set is null...very interesting. Well, its past 5, and my brain is shot. Will do more work tomorrow. Just wanted to keep you all posted in case you were curious. :cool:

npasma 4 Light Poster

After finishing my research on Session() I have the proper lines of code for what I intend, yet the error persists. My fellow programmers seem perplexed as well. Here are the changes I made:


In the page load method:

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        If Not IsPostBack Then
            dsSoftware = SoftwareDB.getEntries
            Me.BindDataGrid()
            Session("dsSoftware") = dsSoftware
        Else
            'no code needed here, the previous code returned too much of the dataset
        End If
    End Sub

This code is from the end of the button Search click method:

Connect.ConnectionString = ConnectString
        Adapter.SelectCommand = New OleDbCommand(SelectStatement, Connect)
        Adapter.SelectCommand.Connection.Open()
        Adapter.Fill(dsSoftware, "[SOFTWARE DATABASE]")
        softwareGrid.DataSource = dsSoftware.Tables("[SOFTWARE DATABASE]")
                Session("dsSoftware") = dsSoftware
        Page.DataBind()
    End Sub

Here I update the Session to cause the dataset to contain my search results only.

After stepping through all of the program's execution, I have found that the error occurs as a result of this code:

Public Sub softwareGrid_EditCommand(ByVal source As Object, _
        ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) _
        Handles softwareGrid.EditCommand

        If Session("Add Mode") = True Then
            Dim i As Integer = dsSoftware.Tables("[SOFTWARE DATABASE]").Rows.Count - 1
            dsSoftware.Tables("[SOFTWARE DATABASE]").Rows(i).Delete()
            Session("AddMode") = False
        End If
        softwareGrid.EditItemIndex = e.Item.ItemIndex
        'this is the line that triggers the error:
        Me.BindDataGrid()
    End Sub

I've called BindDataGrid before, and it works great. This time, however, it claims there is not dataset source, even though I just gave it one TWO LINES before!!!

Just for review:

Private Sub BindDataGrid()
        softwareGrid.DataSource = dsSoftware
        softwareGrid.DataMember = "[SOFTWARE DATABASE]"
        softwareGrid.DataKeyField = "Software #" …
npasma 4 Light Poster

Thank u guys. Yer heroes. In lights of both of your suggestions, I went back and learned how to use F8 to step thru the code, and really gain a feel for how execution flows. I also finished learning about Session(). I've worked through the code with another ASP.NET programmer, and he is stumped. I'll post again in a minute. brb. ;)

npasma 4 Light Poster

Also, perhaps you could discuss the error a little bit. Thanks.

npasma 4 Light Poster

Believe it or not, Paladine, I knew all that before I posted. ;) (No really, its true!) Logic is important, although sometimes I am still forced to sift through other people's code in books and such, learning what I can. Trying out what might not yet be fully understood. The part here I didn't understand was whether that session data set can be updated upon clicking search...or if it is just static to the dataset initially given. Perhaps a 2nd separate dataset is in order? Anyone?

Get some sleep Paladine! You sound overworked! :cheesy:

npasma 4 Light Poster

I am working on filling a datagrid based on results found from a user entering criteria in text boxes and clicking a search button. I have been toying around with Session() to store variables but I dont understand it too well and its giving me trouble. After the user clicks search, the datagrid should only display the desired rows from a database. I can only achieve this by commenting out the line in the load method as follows. If I do not comment the line, the program works, but I get all possible results of the search every time:

My error when I remove the afore mentioned line of code is as follows:

The IListSource does not contain any data sources.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: The IListSource does not contain any data sources.

Source Error:


Line 77: softwareGrid.DataMember = "[SOFTWARE DATABASE]"
Line 78: softwareGrid.DataKeyField = "Software #"
Line 79: softwareGrid.DataBind()
Line 80: End Sub
Line 81:


Source File: c:\inetpub\wwwroot\ASPproject\WebApplication2\WebForm1.aspx.vb Line: 79

Stack Trace:


[HttpException (0x80004005): The IListSource does not contain any data sources.]
System.Web.UI.DataSourceHelper.GetResolvedDataSource(Object dataSource, String dataMember)
System.Web.UI.WebControls.DataGrid.CreateControlHierarchy(Boolean useDataSource)
System.Web.UI.WebControls.BaseDataList.OnDataBinding(EventArgs e)
System.Web.UI.WebControls.BaseDataList.DataBind()
WebApplication2.WebForm1.BindDataGrid() in c:\inetpub\wwwroot\ASPproject\WebApplication2\WebForm1.aspx.vb:79
WebApplication2.WebForm1.softwareGrid_EditCommand(Object source, DataGridCommandEventArgs e) in c:\inetpub\wwwroot\ASPproject\WebApplication2\

npasma 4 Light Poster

Solved my own problem. I had 2 separate instances of the same data set. Thank you for those who assisted me in this.

npasma 4 Light Poster

Here's a little something I found online, I have no idea if it will help, but here goes:

Symptom:
After copying or installing a .NET web-application the following error is observed in the browser when trying to view the site:

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately


Cause
This error is generated because the default set of configuration values in web.config require IIS to treat the web site as an application but this has not been configured.

Remedy:
1. Run Internet Services Manager (under Control Panel > Administrative Tools)
2. Find the project in the list of projects. (Open up your computer in the list and look under "Default Web Site").
3. Bring up its properties (Right click > Properties).
4. If the "application name" (under "Application Settings" on the "Directory" tab) is greyed out then click '[Create]' and then '[OK]'.


I really hope this does something for ya! Good luck!

npasma 4 Light Poster
dsSoftware.Tables("[SOFTWARE DATABASE]").Rows(E.Item.ItemIndex)

Is [SOFTWARE DATABASE] the table name or database name?
It should be the table to execute properly.

[SOFTWARE DATABASE] is the table name. In brackets so it can recognize the name with the space. Terrible name, but hey, I didn't pick it. Any ideas on this?

npasma 4 Light Poster

Since LetsCode's last post I have reevaluated the values of my datagrid textboxes and believe I have solved the pervious indexing error. I won't know for sure until I address the other major error I keep returning to, given as follows:

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:


Line 245:
Line 246: If ValidEntry(tbSoftwareNum, tbSoftwareName, tbLocation) Then
Line 247: Dim dr As DataRow = dsSoftware.Tables("[SOFTWARE DATABASE]").Rows(E.Item.ItemIndex)
Line 248: Try
Line 249: dr("Software #") = tbSoftwareNum


Source File: c:\inetpub\wwwroot\ASPproject\WebApplication2\WebForm1.aspx.vb Line: 247

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
WebApplication2.WebForm1.softwareGrid_UpdateCommand(Object source, DataGridCommandEventArgs E) in c:\inetpub\wwwroot\ASPproject\WebApplication2\WebForm1.aspx.vb:247
System.Web.UI.WebControls.DataGrid.OnUpdateCommand(DataGridCommandEventArgs e)
System.Web.UI.WebControls.DataGrid.OnBubbleEvent(Object source, EventArgs e)
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
System.Web.UI.WebControls.DataGridItem.OnBubbleEvent(Object source, EventArgs e)
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e)
System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
System.Web.UI.Page.ProcessRequestMain()

:idea: :idea: :idea:

This is part of the new and improved Sub softwareGrid_UpdateCommand, which is as follows:

Public Sub softwareGrid_UpdateCommand(ByVal source As Object, ByVal E As DataGridCommandEventArgs) Handles softwareGrid.UpdateCommand
        Dim tbSoftwareNum As String
        tbSoftwareNum = E.Item.Cells(0).Text
        Dim tbSoftwareName As String
        tbSoftwareName = CType(E.Item.Cells(1).Controls(0), TextBox).Text
        Dim tbVersion As String
        tbVersion = CType(E.Item.Cells(2).Controls(0), TextBox).Text
        Dim tbLocation As String
        tbLocation = CType(E.Item.Cells(3).Controls(0), TextBox).Text
        Dim tbSoftBrand As String
        tbSoftBrand = CType(E.Item.Cells(4).Controls(0), TextBox).Text
        Dim tbDatePurchased As String
        tbDatePurchased = CType(E.Item.Cells(5).Controls(0), TextBox).Text
        Dim tbFirstName As String …
npasma 4 Light Poster

I'd like to give the Sub that creates the datagrid as LetsCode requested.
Hope this isn't too much code for y'all to handle! Believe me there's a lot more in the project as a whole! Here we go:

Private Sub btnSearch_Click(ByVal sender As System.Object, ByVal E As System.EventArgs) Handles btnSearch.Click

        Dim Connect As OleDbConnection = New OleDbConnection()
        Dim Adapter As OleDbDataAdapter = New OleDbDataAdapter()
        Dim SelectStatement, ConnectString As String
        Dim WhereClause As String

        WhereClause = "Where "
        If txtSoftwareNum.Text <> "" Then
            WhereClause = WhereClause & "InStr([Software #],'" & _
            txtSoftwareNum.Text & "')>0 AND "
        End If
        If txtSoftwareName.Text <> "" Then
            WhereClause = WhereClause & "InStr([Software Name],'" & _
            txtSoftwareName.Text & "')>0 AND "
        End If
        If txtVersion.Text <> "" Then
            WhereClause = WhereClause & "InStr(Version,'" & _
            txtVersion.Text & "')>0 AND "
        End If
        If txtLocation.Text <> "" Then
            WhereClause = WhereClause & "InStr(Location,'" & _
            txtLocation.Text & "')>0 AND "
        End If
        If txtSoftwareBrand.Text <> "" Then
            WhereClause = WhereClause & "InStr([Soft Brand],'" & _
            txtSoftwareBrand.Text & "')>0 AND "
        End If
        If txtDatePurchased.Text <> "" Then
            WhereClause = WhereClause & "InStr(DatePurchased,'" & _
            txtDatePurchased.Text & "')>0 AND "
        End If
        If txtFirstName.Text <> "" Then
            WhereClause = WhereClause & "InStr(FirstName,'" & _
            txtFirstName.Text & "')>0 AND "
        End If
        If txtLastName.Text <> "" Then
            WhereClause = WhereClause & "InStr(LastName,'" & _
            txtLastName.Text & "')>0 AND "
        End If
        If txtSerialNumber.Text <> "" Then
            WhereClause = WhereClause & "InStr([Serial Number],'" & _
            txtSerialNumber.Text & "')>0 AND …
npasma 4 Light Poster

Thank you for your time, and yes, the resource you gave me has been a great help. My apologies for not including enough information in my former post. This project is getting rather large, and sometimes I briefly lose track of relevant code. :o Although, I've kept it well organized, be assured! I will post the results of my efforts soon. Thanks again.

npasma 4 Light Poster

One more wierd thing: when you click on edit, nothing happens, then if you click it again, the empty text boxes appear. Hope that helps, maybe. :-|

npasma 4 Light Poster

Hello, all!

I'm working with a project to search a Microsoft Access database, show the results in a datagrid, create text boxes to edit the entries found, and then update them.

So far, the search works great, and I have a typical datagrid with an "edit" button on the end, when you click on edit to switch the datagrid into edit mode, the options to update or cancel appear as I have intended, but empty textboxes replace the old data there. I would like the original data present until the user changes something and clicks "update."

I have been trying to get a feel for how to reference these text boxes and fill them, but so far I only get errors. Here is my most recent attempt and the given error:

Public Sub softwareGrid_EditCommand(ByVal source As Object, _
        ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) _
        Handles softwareGrid.EditCommand
        softwareGrid.EditItemIndex = e.Item.ItemIndex

        Dim test As String
        test = softwareGrid.EditItemIndex
        Debug.WriteLine(test)
        Me.BindDataGrid()
        'Dim txtSoftNum As String
        'txtSoftNum = CType(e.Item.Cells(0).Controls(0), TextBox).Text
        'Debug.WriteLine("this is the content of the software number text box:")
        'Debug.WriteLine(txtSoftNum)
    End Sub

    Public Sub softwareGrid_CancelCommand(ByVal sender As Object, ByVal e As DataGridCommandEventArgs)
        softwareGrid.EditItemIndex = -1
        BindDataGrid()
    End Sub

    Private Sub BindDataGrid()
        softwareGrid.DataSource = softwareDS
        softwareGrid.DataMember = "SOFTWARE DATABASE"
        softwareGrid.DataKeyField = "Software #"
    End Sub

    Public Sub softwareGrid_UpdateCommand(ByVal Sender As Object, ByVal E As DataGridCommandEventArgs)
        Dim tbSoftwareNum As TextBox = E.Item.Cells(0).Controls(0)
        Dim tbSoftwareName As TextBox = E.Item.Cells(1).Controls(0)
        Dim tbVersion As TextBox = E.Item.Cells(2).Controls(0)
        Dim tbLocation As TextBox = E.Item.Cells(3).Controls(0)
        Dim tbSoftBrand As …
npasma 4 Light Poster

Or just devote yourself to Python and use the "swap()" command! :p

I heart Python. :o

npasma 4 Light Poster

Could I see some code? Maybe post some in code tags? Thanks. ;)

npasma 4 Light Poster

Yep, having a default value for drop down lists is a good habit to get into I think. Try code something like this:

Dim rdrCategory As SqlDataReader
myConnection.Open()
rdrCategory = cmdSelect.ExecuteReader(CommandBehavior.CloseConnection)
Dim liDefault As ListItem
liCategory = New ListItem([insert text for default entry here as String], [insert default value here as String])
lstCategories.Items.Add(liDefault)
Do While rdrCategory.Read()
     liCategory = New ListItem(rdrCategory("ShortName"), _
          rdrCategory("CategoryID")
     lstCategories.Items.Add(liCategory)
Loop
rdrCategory.Close()
npasma 4 Light Poster

He's right man, you can't expect that anyone is going to bail you out just because you beg and use exclamation marks. Work it out, this stuff isn't easy, you gotta earn it. Come up with some code, post it in tags, and when you get an error post the message, stack trace, etc. Thats the kind of stuff people will sink their teeth into. :rolleyes:

npasma 4 Light Poster

Well, after much effort I have stumbled on the solution. The problem was merely that my update statement, composed of a number of string parameters needed to have single quotes around each item. The code looks like this:

Dim sUpdate As String = "UPDATE [SOFTWARE DATABASE] SET " _
                                    & "[Software Name]='@SoftwareName', Version='@Version', " _
                                    & "Location='@Location', [Soft Brand]='@SoftwareBrand', DatePurchased='@DatePurchased', " _
                                    & "FirstName='@FirstName', LastName='@LastName', SerialNumber='@SerialNumber' Model='@Model' " _
                                    & "WHERE SoftwareNum='@SoftwareNum'"

I'm not out of the woods yet, as I still have some other problems to deal with, but hey, another day another thread, right?

Thanks to those who assisted in solving this problem and a special thanks to Paladine, I never would have gotten this far without your help big guy. I can't believe you do this stuff for free! :cheesy:

Happy programming y'all.

npasma 4 Light Poster

myConnection.Close() for each connection

npasma 4 Light Poster

Correct me if I'm wrong, but I believe you can simply use the public property "font" for this, as in "MyControl.Font.Style" Or "FontStyle.Bold".

HI ,

i m using System.Windows.Forms.ListView control.
i want to set the text in the subItems to bold at run time.

How do i acchieve this :!:

Thanks in advance.

npasma 4 Light Poster

OK, I'm back with modified code- but no dice. Same error. I changed the parameter entry stuff according to Paladine's advice, and I got my debugger working, and checked all 10 of my parameters- they all contain values, none of them are null. How then can I be getting this error? :surprised

Public Shared Function updateEntry(ByVal prmSoftware As Software) As Boolean
        Dim sUpdate As String = "UPDATE [SOFTWARE DATABASE] SET " _
                                    & "[Software Name]=@SoftwareName, Version=@Version, " _
                                    & "Location=@Location, [Soft Brand]=@SoftwareBrand, DatePurchased=@DatePurchased, " _
                                    & "FirstName=@FirstName, LastName=@LastName, SerialNumber=@SerialNumber, Model=@Model " _
                                    & "WHERE SoftwareNum=@SoftwareNum"
        Dim DBConnection As OleDbConnection = Connection()
        Dim cmdSoftware As New OleDbCommand(sUpdate, DBConnection)

        Dim prmSoftwareNum As OleDbParameter = cmdSoftware.Parameters.Add("@SoftwareNum", OleDbType.VarChar)
        Dim prmSoftwareName As OleDbParameter = cmdSoftware.Parameters.Add("@SoftwareName", OleDbType.VarChar)
        Dim prmVersion As OleDbParameter = cmdSoftware.Parameters.Add("@Version", OleDbType.VarChar)
        Dim prmLocation As OleDbParameter = cmdSoftware.Parameters.Add("@Location", OleDbType.VarChar)
        Dim prmSoftwareBrand As OleDbParameter = cmdSoftware.Parameters.Add("@SoftwareBrand", OleDbType.VarChar)
        Dim prmDatePurchased As OleDbParameter = cmdSoftware.Parameters.Add("@DatePurchased", OleDbType.VarChar)
        Dim prmFirstName As OleDbParameter = cmdSoftware.Parameters.Add("@FirstName", OleDbType.VarChar)
        Dim prmLastName As OleDbParameter = cmdSoftware.Parameters.Add("@LastName", OleDbType.VarChar)
        Dim prmSerialNumber As OleDbParameter = cmdSoftware.Parameters.Add("@SerialNumber", OleDbType.VarChar)
        Dim prmModel As OleDbParameter = cmdSoftware.Parameters.Add("@Model", OleDbType.VarChar)
        prmSoftwareNum.Value = prmSoftware.SoftwareNum
        prmSoftwareName.Value = prmSoftware.SoftwareName
        prmVersion.Value = prmSoftware.Version
        prmLocation.Value = prmSoftware.Location
        prmSoftwareBrand.Value = prmSoftware.SoftwareBrand
        prmDatePurchased.Value = prmSoftware.DatePurchased
        prmFirstName.Value = prmSoftware.FirstName
        prmLastName.Value = prmSoftware.LastName
        prmSerialNumber.Value = prmSoftware.SerialNumber
        prmModel.Value = prmSoftware.Model

        DBConnection.Open()
        Dim iCount As Integer
        iCount = cmdSoftware.ExecuteNonQuery()
        DBConnection.Close()
        If iCount > 0 Then
            Return True
        Else
            Return False
        End If
    End Function

The error is:

Exception Details: System.Data.OleDb.OleDbException: No value given for one or more required parameters.

Source Error:

Paladine commented: Good Posting! +4
npasma 4 Light Poster

Thank you all for your time in replying to my question. I am bogged down today, working on switching some servers from Novell to Windows NT (hooray!), ;) but hopefully I'll be able to address these issues soon! Man, I'm glad I found this site. :mrgreen: Thanks again.

npasma 4 Light Poster

This may clarify, I changed the UPDATE statement to be more accurate, what you see before each parameter there is the actual column names, many in brackets b/c they would otherwise be illegal in VB code. (I didn't name the little buggers.) The error I get is still the same. Am I allowed to have slightly diff. param names than the corresponding column names?

Dim sUpdate As String = "UPDATE [SOFTWARE DATABASE] SET " _
                                    & "[Software #]=@SoftwareNum, [Software Name]=@SoftwareName, Version=@Version, " _
                                    & "Location=@Location, [Soft Brand]=@SoftwareBrand, DatePurchased=@DatePurchased, " _
                                    & "FirstName=@FirstName, LastName=@LastName, SerialNumber=@SerialNumber, Model=@Model " _
                                    & "WHERE SoftwareNum=@SoftwareNum"
npasma 4 Light Poster

OK, yeah u guessed it. VBnoob here. Like so many other poor souls, lost in a sea of code...heres the dealio-

I know param's need to be completely done and in the correct order for executeNonQuery() to work, but here's my error:

Exception Details: System.Data.OleDb.OleDbException: No value given for one or more required parameters.

Source Error:

Line 88: DBConnection.Open()
Line 89: Dim iCount As Integer
Line 90: iCount = cmdSoftware.ExecuteNonQuery()
Line 91: DBConnection.Close()
Line 92: If iCount > 0 Then


Source File: c:\inetpub\wwwroot\ASPproject\WebApplication2\SoftwareDB.vb Line: 90

Stack Trace:

[OleDbException (0x80040e10): No value given for one or more required parameters.]
System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(Int32 hr) +41
System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) +174
System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) +92
System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) +65
System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) +112
System.Data.OleDb.OleDbCommand.ExecuteNonQuery() +66
WebApplication2.SoftwareDB.updateEntry(Software Software) in c:\inetpub\wwwroot\ASPproject\WebApplication2\SoftwareDB.vb:90
WebApplication2.WebForm1.btnUpdate_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\ASPproject\WebApplication2\WebForm1.aspx.vb:251
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1292


The relevant code is as follows:

Public Shared Function updateEntry(ByVal Software As Software) As Boolean
        Dim sUpdate As String = "UPDATE [SOFTWARE DATABASE] SET " _
                                    & "SoftwareNum=@SoftwareNum, SoftwareName=@SoftwareName, Version=@Version, " _
                                    & "Location=@Location, SoftwareBrand=@SoftwareBrand, DatePurchased=@DatePurchased, " _
& "FirstName=@FirstName, LastName=@LastName, SerialNumber=@SerialNumber, Model=@Model " _
                                    & "WHERE SoftwareNum=@SoftwareNum"
        Dim DBConnection As OleDbConnection = Connection()
        Dim cmdSoftware As New OleDbCommand(sUpdate, DBConnection)
        cmdSoftware.Parameters.Add("@SoftwareNum", Software.SoftwareNum)
        cmdSoftware.Parameters.Add("@SoftwareName", Software.SoftwareName)
        cmdSoftware.Parameters.Add("@Version", Software.Version) …