Click here to Skip to main content
15,915,094 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionOpeing a Form based on a Query Pin
R. A. Abbasi17-Dec-05 19:28
R. A. Abbasi17-Dec-05 19:28 
AnswerRe: Opeing a Form based on a Query Pin
Dave Kreskowiak18-Dec-05 11:52
mveDave Kreskowiak18-Dec-05 11:52 
GeneralRe: Opeing a Form based on a Query Pin
R. A. Abbasi18-Dec-05 13:47
R. A. Abbasi18-Dec-05 13:47 
GeneralRe: Opeing a Form based on a Query Pin
Dave Kreskowiak18-Dec-05 14:46
mveDave Kreskowiak18-Dec-05 14:46 
Questiondbf with VB.Net (2005) Pin
Rainer_4217-Dec-05 11:41
Rainer_4217-Dec-05 11:41 
AnswerRe: dbf with VB.Net (2005) Pin
Mekong River17-Dec-05 16:49
Mekong River17-Dec-05 16:49 
AnswerRe: dbf with VB.Net (2005) Pin
albCode19-Dec-05 5:01
albCode19-Dec-05 5:01 
QuestionDatabase help Pin
Binary011017-Dec-05 8:51
Binary011017-Dec-05 8:51 
I experimenting with Writing database applications and trying to do different things with different controls. My current problem is I've been working on a feature to search a database containg my DVD collection. It is an Access 2003 Database with only one table. Here is my code thus far with the area where the program bombs in bold, any help would be greatly appreciated.Also the code that is supposed to check for a database is'nt working either, but I commented it out for now:


'Search<br />
<br />
        'If they have no active dataset, refuse:<br />
<br />
        'If ds.Tables.Count = 0 Then<br />
        '    MsgBox("Please use the file menu to open a dataset, or create         <br />
        'a new one first.")<br />
        '    Exit Sub<br />
        'End If<br />
<br />
        'search for the target in both columns, then display it<br />
<br />
        Dim searchfor As String = InputBox("Enter you Search Term", "Search")<br />
<br />
        searchfor = searchfor.ToLower<br />
        lstResults.Items.Clear()<br />
<br />
        Dim i, x, y, count As Integer<br />
<br />
        dt = ds.Tables!DVDLIST ' set dt to point to this table<br />
<br />
        TotalRows = dt.Rows.Count<br />
<br />
        For i = 0 To TotalRows - 1<br />
            x = ds.Tables(Name).Rows(i).Item(0).ToString.ToLower.IndexOf(searchfor) 'See if Title column matches<br />
<br />
            y = ds.Tables(0).Rows(i).Item(1).ToString.ToLower.IndexOf(searchfor) 'see about desc column too<br />
<br />
            If x <> -1 Or y <> -1 Then  'Match<br />
                lstResults.Items.Add(ds.Tables(0).Rows(i).Item(0))<br />
                'Add title field to a listbox<br />
                count += 1<br />
<br />
            End If<br />
<br />
        Next i<br />
<br />
<br />
        If count = 0 Then  'no matches found<br />
            MsgBox("No match for " & searchfor & " was found...")<br />
        Else<br />
            lstResults.Visible = True<br />
        End If


BINARY
AnswerRe: Database help Pin
Christian Graus17-Dec-05 22:12
protectorChristian Graus17-Dec-05 22:12 
GeneralRe: Database help Pin
jcrussell18-Dec-05 18:28
jcrussell18-Dec-05 18:28 
QuestionGame Programming using VB.NET Pin
dipankaronline17-Dec-05 7:34
dipankaronline17-Dec-05 7:34 
AnswerRe: Game Programming using VB.NET Pin
Mazitan17-Dec-05 8:04
Mazitan17-Dec-05 8:04 
AnswerRe: Game Programming using VB.NET Pin
Mekong River17-Dec-05 16:54
Mekong River17-Dec-05 16:54 
Questionate help VB.net transparency between objects Pin
JUNEYT17-Dec-05 6:53
JUNEYT17-Dec-05 6:53 
AnswerRe: ate help VB.net transparency between objects Pin
Christian Graus17-Dec-05 22:06
protectorChristian Graus17-Dec-05 22:06 
QuestionRemove file name while print in dos mode. Pin
.NetRams17-Dec-05 0:17
.NetRams17-Dec-05 0:17 
AnswerRe: Remove file name while print in dos mode. Pin
Dave Kreskowiak17-Dec-05 8:18
mveDave Kreskowiak17-Dec-05 8:18 
Question&quot;shape query &quot; in .NET Pin
Yogesh Saravate16-Dec-05 19:21
Yogesh Saravate16-Dec-05 19:21 
QuestionSecurity Exception Pin
Aanchal Naidu16-Dec-05 14:30
Aanchal Naidu16-Dec-05 14:30 
QuestionFind mac address on all computers on network Pin
GregRH16-Dec-05 12:42
GregRH16-Dec-05 12:42 
AnswerRe: Find mac address on all computers on network Pin
Dave Kreskowiak16-Dec-05 15:09
mveDave Kreskowiak16-Dec-05 15:09 
GeneralRe: Find mac address on all computers on network Pin
GregRH19-Dec-05 5:15
GregRH19-Dec-05 5:15 
QuestionHave a problem Saving changes to database Pin
jbeggie16-Dec-05 8:33
jbeggie16-Dec-05 8:33 
AnswerRe: Have a problem Saving changes to database Pin
Dave Kreskowiak16-Dec-05 9:23
mveDave Kreskowiak16-Dec-05 9:23 
QuestionDesigner Generated Code Pin
Tainter16-Dec-05 7:22
Tainter16-Dec-05 7:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.