debasisdas 580 Posting Genius Featured Poster

I think your case is hardware dependent.

You need to check the server and the LAN.

Also check how much overloaded is your LAN because of other services.

debasisdas 580 Posting Genius Featured Poster

Cry loud.

No one is going to care for you till you show some effort, and that has already been communicated to you.

debasisdas 580 Posting Genius Featured Poster

This may help you.

Also try to find here.

debasisdas 580 Posting Genius Featured Poster

454

debasisdas 580 Posting Genius Featured Poster

You need to replace ' (single quote) with ''(two single quotes)

Use the function replace or just play with CHR(39).

debasisdas 580 Posting Genius Featured Poster

Please go through this and this.

debasisdas 580 Posting Genius Featured Poster

All you luck is here.

debasisdas 580 Posting Genius Featured Poster

I would suggest not to store the videos in the Database. Instead just store the file name with proper path and store the actual file in the file system . In the database you need to store other attributes (comments etc...) . After that implements a keyword based search is just a mater of time.

debasisdas 580 Posting Genius Featured Poster

Is this your code ?

Do you understand the code in this project ?

debasisdas 580 Posting Genius Featured Poster

Why you always keep asking for code ?

Show some effort .

debasisdas 580 Posting Genius Featured Poster

You want the entire projects to be delivered to you nicely packed or are you also interested in lending a helping hand ?

debasisdas 580 Posting Genius Featured Poster

Try the following if you are trying to create a table by VB 6 code.

Private Function CreateTable() As Boolean
  Dim catDatabase As ADOX.Catalog
  Dim oTable As ADOX.Table
  Dim bCreateTable As Boolean
' -------------------------------
  On Error GoTo PROC_ERR
  
  
  bCreateTable = False
  
  Set catDatabase = New ADOX.Catalog
  With catDatabase
	.ActiveConnection = "Provider='Microsoft.Jet.OLEDB.4.0';" & _
						"Data Source='C:\TestDB.mdb';"
	
	Set oTable = .Tables("Priorities")
  End With
  
PROC_EXIT:
  
  If (bCreateTable) Then
	Set oTable = New ADOX.Table
	With oTable
	  .Name = "Priorities"
	  Call .Columns.Append("Priority_ID", adInteger)
	  Call .Columns.Append("Description", adVarWChar, 20)
	End With
	
	Call catDatabase.Tables.Append(oTable)
  End If
  
  If (Not catDatabase Is Nothing) Then
	Set catDatabase = Nothing
  End If
 
  CreateTable = bCreateTable
PROC_ERR:
  Select Case Err.Number
  
	bCreateTable = True
	Err.Clear
	Resume PROC_EXIT
  Case Is <> 0
	MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure cmdCreateTable_Click of Form frmMain"
	bCreateTable = False
	Err.Clear
	Resume PROC_EXIT
  End Select
End Function
debasisdas 580 Posting Genius Featured Poster

Yes , of-course.

I never disagree without on that.

Always there are multiple ways of achieving the same goal.

What i suggested was just another work around.

debasisdas 580 Posting Genius Featured Poster

Do you have any code that you are working on ?

debasisdas 580 Posting Genius Featured Poster

What about starting a new thread of your own and not digging a dead thread .

debasisdas 580 Posting Genius Featured Poster

Try this.....

Dim conn As New ADODB.Connection
Dim rec As New ADODB.Recordset

Private Sub cmd_delete_Click()
   Dim rResult
   
   rResult = MsgBox("Do you want to delete the record", vbYesNo)
   
   If rResult = vbYes Then
       conn.Execute "Delete * from Employee where EmployeeID =" & DataGrid1.Columns(0).Value
       
       Set DataGrid1.DataSource = Nothing
       Set rec = Nothing
       
       Set rec = New ADODB.Recordset
       rec.Open "Select * from Employee", conn, adUseClient, adLockOptimistic
       Set DataGrid1.DataSource = rec
   End If
End Sub

Private Sub DataGrid1_BeforeColUpdate(ByVal ColIndex As Integer, OldValue As Variant, Cancel As Integer)
    Dim rResult
    rResult = MsgBox("Do you want to Edit the record", vbYesNo)
   
   If rResult = vbNo Then
       Cancel = True
       DataGrid1.ReBind
   End If
End Sub

Private Sub DataGrid1_BeforeDelete(Cancel As Integer)
   Dim rResult
   
   rResult = MsgBox("Do you want to delete the record", vbYesNo)
   
   If rResult = vbNo Then
       Cancel = True
   End If
End Sub

Private Sub DataGrid1_Error(ByVal DataError As Integer, Response As Integer)
   Response = False
End Sub

Private Sub Form_Load()
   conn.Open "test"
   rec.Open "Select * from Employee", conn, adUseClient, adLockOptimistic
   
   Set DataGrid1.DataSource = rec
   DataGrid1.AllowUpdate = True
End Sub
debasisdas 580 Posting Genius Featured Poster

Please go through this.

debasisdas 580 Posting Genius Featured Poster

Can you post a sample postal addresses (just to understand your question better).

debasisdas 580 Posting Genius Featured Poster

Suggestion:--
1. Instead of using Case cmbSearch
Case "By: Customer Name":

take the value from a combobox instead (use the index in CASE not the text).

2. Don't use like operator on a Date field, you will get unexpected result.

Q. What is that DataGrid in your code, is that simply a control or a method name ?

debasisdas 580 Posting Genius Featured Poster

try this

select eid from certified
where eid = (select eid from 
(select eid,count(aid) from certified
group by eid
order by count(aid) desc)
                        where rownum<2)
debasisdas 580 Posting Genius Featured Poster

Please tell us more.

What is that control (grid) ?

What is the database ?

How it is connected ?

How are you populating the grid ?

debasisdas 580 Posting Genius Featured Poster

Just read the previous post.

debasisdas 580 Posting Genius Featured Poster

Green hair and purple eyes, you are so colorful.

BTW, do you survive on Photosynthesis ? :icon_mrgreen:

Welcome to Daniweb.

debasisdas 580 Posting Genius Featured Poster

Interesting intro. :cool:

debasisdas 580 Posting Genius Featured Poster

Welcome to the forum.

I think you are an asset for us, just jump into the forum and act savior.

debasisdas 580 Posting Genius Featured Poster

Hi Rynkadink,

Welcome to the forum, hope you have a nice time here.

debasisdas 580 Posting Genius Featured Poster

Hi new member,

Welcome aboard.

debasisdas 580 Posting Genius Featured Poster

Hi Shalanni,

Welcome to the forum.

debasisdas 580 Posting Genius Featured Poster

Why are you executing the script posted here, that was only an example. Does you table structure matches exactly the example posted here.

How are you calling the SQL from VB ?

How are you connecting to database ?

Have you connected to the database before calling the SQL ?

debasisdas 580 Posting Genius Featured Poster

kindly post the underlying table structure and desired output for further analysis.

debasisdas 580 Posting Genius Featured Poster

Yes it is.

Is not that clear from the post #4 ?

debasisdas 580 Posting Genius Featured Poster

what is not working ?

Vb code or database code ?

what is the code that you are working on ?

What is the error message ?

debasisdas 580 Posting Genius Featured Poster

Please do not hijack others threads.

Please start your own thread for a new question.

debasisdas 580 Posting Genius Featured Poster

Please do not hijack others threads.

Please start your own thread for a new question.

debasisdas 580 Posting Genius Featured Poster

why you need to post this question in vb 6 forum ?

debasisdas 580 Posting Genius Featured Poster

If you are looking for the connection string find it here.
Can find a lot of pseudo code by hitting search engines.

debasisdas 580 Posting Genius Featured Poster

I really do not understand why are you setting the values back and forth from and to the same control.

Why not use variables with wider scope.

debasisdas 580 Posting Genius Featured Poster

why not create a sub program and call in all the events you want it to execute.

debasisdas 580 Posting Genius Featured Poster

Help you on what ?

Filtering
sorting
exporting

or

starting your project ?

debasisdas 580 Posting Genius Featured Poster

Welcome aboard.

debasisdas 580 Posting Genius Featured Poster

You need to maintain a flag ,and based on the flag value do what ever you want.

debasisdas 580 Posting Genius Featured Poster

To live remains an art which everyone must learn, and which no one can teach.

debasisdas 580 Posting Genius Featured Poster

All the help that you want is here for you.

debasisdas 580 Posting Genius Featured Poster

So, this is the place to peep into.

debasisdas 580 Posting Genius Featured Poster

Hi Shahzad,

Welcome to the forum.

You are most welcome to participate in the subject of your interest.

debasisdas 580 Posting Genius Featured Poster

Hi Achraf,

Welcome aboard.

debasisdas 580 Posting Genius Featured Poster

That purely depends on the requirement.

debasisdas 580 Posting Genius Featured Poster

Convert the piece of SQL code into a stored function and pass the year as parameter.

debasisdas 580 Posting Genius Featured Poster

456

debasisdas 580 Posting Genius Featured Poster

Hi Ben,

Welcome to the forum.

Hope you have a nice time learning new stuff and sharing that you know.