2 Replies - 2917 Views - Last Post: 05 February 2009 - 08:14 AM Rate Topic: -----

#1 cyber_sam  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 08-October 08

Guide me to use VB 6.0 control send sms

Post icon  Posted 02 February 2009 - 08:48 AM

Hey frnd i been working for project and i ve stuck in middle .

i m using vb 6.0 language with sql all work fine .

I dont need code what i need bit of guidence from u coder.

here it goes, i ve current recordset and i ve to send sms

I ve IP address, port, uid and Pass of SMS service site(private service).
Do i ve to navigate to the browser or can i directly use it on module{com}

if module what contrl does i ve to use --is it winsock or other or IE activex


PLS guide me if possible.


Is This A Good Question/Topic? 0
  • +

Replies To: Guide me to use VB 6.0 control send sms

#2 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1632
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: Guide me to use VB 6.0 control send sms

Posted 02 February 2009 - 07:43 PM

[rules][/rules]
Was This Post Helpful? 0
  • +
  • -

#3 cyber_sam  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 08-October 08

Re: Guide me to use VB 6.0 control send sms

Posted 05 February 2009 - 08:14 AM

Dim mcnn As ADODB.Connection
Option Explicit
Private Sub form_load()
  Dim mcmd As ADODB.Command
  Dim mrst As ADODB.Recordset
  Set mcnn = New ADODB.Connection
  Dim mstrUSA  As String
  mcnn.Open "PROVIDER=sqloledb.1;DATA SOURCE=bigdream\project;INITIAL CATALOG= northwnd", "sa", "samalgorai"
  Set mcmd = New ADODB.Command
   mstrUSA = "UK"
   
   With mcmd
	 .ActiveConnection = mcnn
	 .CommandType = adCmdTable
	 .CommandText = "customers where country = '" & mstrUSA & " '"
	  Set mrst = .Execute
   End With
   

 Call FillFromRecordset_FlexGrid(MSHFlexGrid, mrst, True)
  
  
  With tvAlarm
   .Nodes.Add , , "root", mstrUSA
   .Nodes.Add "root", tvwChild, "Major", "Major"
   .Nodes.Add "root", tvwChild, "Critical", "Critical"
   .Nodes(1).Expanded = True
   End With

 Set mrst = Nothing
 Set mcmd = Nothing
End Sub


Private Sub FillFromRecordset_FlexGrid(p_ctlFlexGrid As Control, p_objRecordset As Object, _
										p_boolFileHeader As Boolean)


Dim lngCol As Long
Dim lngRow As Long
Dim boolOldRedraw As Boolean


With p_ctlFlexGrid

	.Cols = p_objRecordset.Fields.Count
	.FixedCols = 0


If p_boolFileHeader Then
	 .FixedRows = 1
	 For lngCol = 0 To p_objRecordset.Fields.Count - 1
		.TextMatrix(0, lngCol) = p_objRecordset.Fields(lngCol).Name
	 Next lngCol
	
End If
.Rows = .FixedRows + 1
boolOldRedraw = .Redraw
.Redraw = False

If p_objRecordset.EOF Then
	.AddItem ""
	.RemoveItem .FixedRows
	.RowHeight(.FixedRows) = 0
Else
	lngRow = .Rows
	Do While Not p_objRecordset.EOF
	.AddItem ""
	For lngCol = 0 To p_objRecordset.Fields.Count - 1
		.Redraw = False
		.TextMatrix(lngRow, lngCol) = p_objRecordset.Fields(lngCol).Value & ""
		.Redraw = boolOldRedraw
	 Next lngCol
	 lngRow = lngRow + 1
	 
	 ' stuck here
	 If p_objRecordset!City = "London" Then
	  ' pls help here to write code  for sending sms
	  ' have IP port UserID Pass
	   
	 End If
	 
	 p_objRecordset.MoveNext
	 Loop
	 .RemoveItem .FixedRows
	 End If
	 .Redraw = boolOldRedraw
	 .Refresh
	 End With
	 
End Sub

Private Sub Form_Unload(Cancel As Integer)
	Unload Me
	'Set mrst = Nothing
   ' Set mcmd = Nothing
	Set mcnn = Nothing

End Sub
 




Also Pls help me to optimize the code.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1