ParsX.com
پذیرش پروژه از دانشجویی ... تا سازمانی 09376225339
 
   ProfileProfile   Log in to check your private messagesLog in to check your private messages  |  FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups Log inLog in   RegisterRegister 

جستجو در پایگاه داده؟

 
Post new topic   Reply to topic    ParsX.com Forum Index -> ويژوال بيسيك .NET
View previous topic :: View next topic  
Author Message
sajadkk
مهمون يكي دو روزه


Joined: 11 Jul 2005
Posts: 18

PostPosted: Thu Sep 22, 2005 11:01 pm    Post subject: جستجو در پایگاه داده؟ Reply with quote

سلام
لطفا جستجو در پایگاه داده را توضیح بدهید
Back to top
vahid
بي تو هرگز


Joined: 26 Nov 2004
Posts: 3067
Location: Tehran

PostPosted: Fri Sep 23, 2005 8:21 am    Post subject: Reply with quote

به نمونه كد زير نگاه كن . دو روش استفاده كردم .
يكي از ليست باكس . يكي ديگه از SQL به كمك كنترل Data Grid :

Private Sub cmdSearch_Click()
Dim FieldValue, FieldName, Criteria As String
lstSearch.Clear
FieldName = Combo1.Text
FieldValue = TxtBookName.Text
If FieldValue <> "" Then
    FieldValue = TxtBookName.Text
    Criteria = FieldName & " =" & "'" & FieldValue & "'"
    Data1.Recordset.FindFirst Criteria
    If Data1.Recordset.NoMatch = True Then
        lstSearch.AddItem "Field Not Found"
    End If
    Do While Data1.Recordset.NoMatch = False
   
    lstSearch.AddItem Data1.Recordset.Fields("id").Value _
      & Space(3) & Data1.Recordset.Fields("name").Value _
        & Space(3) & Data1.Recordset.Fields("family").Value
    Data1.Recordset.FindNext Criteria
    Loop
 End If
 ''''''''''''''''''''''''روش دوم
 Data1.RecordSource = "select * from vahid_parsx " & _
    "where " & FieldName & " = " & "'" & FieldValue & "'"
   
Data1.Refresh
MSFlexGrid1.Visible = True
lstSearch.Visible = True

End Sub
 
Back to top
sajadkk
مهمون يكي دو روزه


Joined: 11 Jul 2005
Posts: 18

PostPosted: Fri Sep 23, 2005 11:15 am    Post subject: Reply with quote

دستت درد نکنه داش وحید
می رم امتحانش کنم.
Back to top
unknown
مدير بخش ويژوال بيسيك
مدير بخش ويژوال بيسيك


Joined: 05 Dec 2004
Posts: 439
Location: Tehran

PostPosted: Fri Sep 23, 2005 5:36 pm    Post subject: Reply with quote

وحید فایل کرک شدهء video soft grid رو داری
Back to top
vahid
بي تو هرگز


Joined: 26 Nov 2004
Posts: 3067
Location: Tehran

PostPosted: Sat Sep 24, 2005 7:55 pm    Post subject: Reply with quote

چي هست ؟
Back to top
Display posts from previous:   
Post new topic   Reply to topic    ParsX.com Forum Index -> ويژوال بيسيك .NET All times are GMT + 3.5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum