Thank you both, I was about to resond with 'how do I use the count()?" but openig up my SQL Server I found I was missing my ' and ' around my where item. :)
The reason I cant use a predefined index which auto counts up is because I'm using a randomly generated key of numbers and letters as the ID to track the job, as everything that has to do with the job is centered around the ID I thought it easiest to use that as my 'primary...
User Profile
Collapse
-
Nimion started a topic There must be a faster way to dup check in Access than this...in Visual BasicThere must be a faster way to dup check in Access than this...
Sorry if I posted in the wrong forum, but since I'm looking at VB code I have a 50/50 chance at being wrong. :)
I've been trying a variety of methods to speed up the checking for duplicates.
Right now I'm using a simple while statement and if statement to go through the database row by row checking the field I want, and then moving onto the next.
At the moment it works fine because the database is in... -
Well I figured it out...I did something revolutionary. I went into the database and made all the fieldnames without a space between them -.-'...
It seems that the commandbuilder wasnt putting in the [ ]'s and I didnt know how to get it to use the bracekts... so I just made that small modification (doesnt really affect anything). And now it works like a charm!... Lol. Thanks for everyone who attempted to help me :)Leave a comment:
-
Ok I've re-written the entire code from scratch... Now I get an entirly different error. The dreaded "No value given for one or more required parameters." at the da.update line... Now I thought the ?'s meant those were parameters? I replaced all the ?'s with 0's for a test, and it added a new row....with all 0's. So I know its something with the ?'s and it not seeing the parameters in the add.row..
New Code Below:
...Leave a comment:
-
Ok I made sure I had one adpater, and it was being filled. I went into debug mode and took a look at the insert command that was built and it was correct. But I get that same error at the same spot... Insert Into was wrong.. I tried playing with it for a few hours but it seems something isnt matching up right behind the scenes and I cant seem to pinpoint it.Leave a comment:
-
Well I tried it with and without a primary key. And I was under the impression the Command Builder built the insert into statment automatically based upon the select?Leave a comment:
-
Problems adding a new row to an ms access database via VB.net
Im getting the "Syntax error in INSERT INTO statement." at my
da.Update(ds, "Expenses") line in code... heres my full code to follow.
------------------------------------------------------------------------------------------------------------
Private Sub ConnectToolStri pMenuItem_Click (ByVal sender As System.Object, ByVal e As System.EventArg s) Handles ConnectToolStri pMenuItem.Click
... -
It worked...Haha. It was that easy..... -.- wow...I used every combination I could think of but the obvious eluded me... thanks a lot :)Leave a comment:
-
That actually returned a value into my text box...but it returned this..
DataGridViewTex tBoxCell { ColumnIndex=4, RowIndex=1 }Leave a comment:
-
Private Sub DataGridMatrix_ CellContentClic k(ByVal sender As System.Object, ByVal e As System.Windows. Forms.DataGridV iewCellEventArg s) Handles DataGridMatrix. CellContentClic k
txtdata.Text = DataGridMatrix( 4, 1)
End Sub
The error is:
Value of type 'System.Windows .Forms.DataGrid ViewCell' cannot be converted to 'String'.
I want the actual value of the cell to be placed...Leave a comment:
-
Using excel data in vb once its in my application..?
For work I've been tasked with creating some verification programs. So I thought best way to do this is to take their excel sheet and compare the data...
I've been able to open the excel sheet and place it into a DataGridView, but now I'm stumped on how I actually use the data Im seeing...
I.E - The sheet has 2 columns (min) and (max) with about 20 rows of values... I want to be able to compare the data a user inputs...
No activity results to display
Show More
Leave a comment: