Hi, I have been struggling to send sms using pdu mode in vb.net, My code is working fine for Text Mode, even I am sending sms from Hyperterminal with PDU command. When I try the same PDU in VB.Net code. The same is not working. I trying waiting for the port to respond. Used Thread.Sleep upto 10000ms but not succeed. Below is my code in VS 2005 (2.0 Framework) Dim firstarg As Integer = Convert.ToInt32(pdudata.Substring(0, 2)) firstarg = firstarg * 2 tmp = pdudata.Substring(2) tmp = tmp.Substring(firstarg) firstarg = tmp.Length \ 2 port.WriteLine("atz" & vbCrLf) port.WriteLine("ate0" & vbCrLf) port.WriteLine("AT+CMGF=0" & vbCrLf) read = New Byte(port.BytesToRead - 1) {} port.Read(read, 0, read.Length) 'txtsms.Text += Encoding.ASCII.GetString(inbuf); tmp = port.ReadExisting() port.WriteLine("AT+CMGS=15" & vbCrLf) Thread.Sleep(1000) port.WriteLine("0021000C91190910153570000002E834" & Chr(26)) Thread.Sleep(5000) port.DiscardOutBuffer() 'read = New Byte(port.BytesToRead - 1) {} 'port.Read(read, 0, read.Length) I tried using msgbox and found that everything is going perfect except the last command i.e. 0021.... chr(26) The given pdu is working in hyperterminal. Can u figure out the problem for me. Your solution will be highly appreciable as I am tired trying various combinations. Thanking you in the meantime. Jaidev Khatri
JayKhatri
Posts
-
Sending SMS in PDu mode programatically in VB.Net -
Using DataTables against arraysThen I will study Generic.list first. Thanks for your reply.
-
Using DataTables against arraysHi, I have again here in this section just to have experts comments over my thought: My project is in VB.Net. I was using arrays in vb6 when I was coding, but since when I used VB.Net, I merely use array and almost replaced Datatables wit that. I store several things and results in datatable. My question is should I continue using datatable instead of arrays as it gives me great extension and flexibility. Is it a gud idea. Thanks in advance. Jay Khatri
-
Detecting a right way to use variables in .NetGreat!!! that make a big difference. Thanks for the addition. Jay Khatri
-
Detecting a right way to use variables in .Netnice one ray and impressive too. Thanks alot for your anticipation. I have more queries which arise time by time. Hope I will get this kind of reply then. Best Regards Jay Khatri
-
Asp.Net Rendering OptionHi, I just like to know that can we change the way Asp.Net render the controls. Like RadioButtonGroup Gets converted in Tables and cells and radiobuttons of HTML. Can I edit the controls so that it render to Div instead of table. There are lot of controls like GridView which create lot of problems in layouting. Thanks & Best Regards Jay Khatri
-
Detecting a right way to use variables in .Netthanks for such a quicky answer.
-
Detecting a right way to use variables in .NetHi, I am using Dim str as string frequently in my windows application mostly to fill any dataset to query anything and more. basically how I use this is as follows: Dim dSetTemp As New DataSet Dim str As String str = "select trans_vchr.trans_vchr_id, trans_vchr.session_cfee_id, blah blah...." dSetTemp = clscmn.Fill_DS(str) --> fill_ds is a function created to increase the productivity. Here if I like I can easily do the same like this dSetTemp = clscmn.Fill_DS("select trans_vchr.trans_vchr_id, trans_vchr.session_cfee_id, blah blah....") Here my question is whether I use str variable or not, actually I use the variable as it make my debugging so easy I just copy the string and paste in sql to test the query. Here that gives me productivity while debugging but if it is at the cost of performance. I would compromise with debugging facility or If it is negligible, it can be left. Can you suggest what will be best for me. I like to save bytes to be loaded in memory and like to have best performance. Thanks in Advance. Jay Khatri
-
Altering dll reference from in exe in VB.Net DeploymentHi Experts, I have developed a database driven software which requires few dll's that I have used in my project. When I created the Deployment project and deployed to my client with that. There was a problem with dll path. However I have fixed the same by creating a directory structure and placing dlls into that. Some dlls required to be placed in my application folder. However I had done and changed the same in my deployment project. But what if I don't want to place that dlls in my application directory and like to keep in windows\system and how would my exe be reference to a new path. That is my question. I hope you understood my problem. I am using VS 2005 IDE with vb.net Lang and MS-Access as DB. Thanks in advance. Jay Khatri
-
Using Jet Oledb as linked server and trigger rows from VB6.0Yes this code was for excel sheet, I got an idea for commit that I had written after insert. Other I had ignored in my case. and yes it is bypassing the trigger. Is there still any Ray of Light as I have spoken to my senior who is less interested to select another sql db. Best regards Jay Khatri
-
Using Jet Oledb as linked server and trigger rows from VB6.0and please refer to this http://sqlblogcasts.com/blogs/piotr_rodak/archive/2007/10/29/distributed-transactions-and-triggers.aspx[^]
-
Using Jet Oledb as linked server and trigger rows from VB6.0please see this, the last working trigger from sql server. Now vb giving no error but not entering anything in access. SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER trigger [updmth] on [dbo].[Day_Trn] AFTER insert As begin declare @tmp table (ldtrn decimal, lgl_id int,lacc_id decimal,nentry_id int,sdate datetime, snchcltr tinyint,damt decimal,nchqno varchar(9),spart varchar(50),bdc tinyint) insert @tmp (ldtrn, lgl_id,lacc_id,nentry_id,sdate, snchcltr,damt,nchqno,spart,bdc) select ldaytrn_id,lgl_id,lacc_id,nentry_id,sdate,snchcltr,damt,nchqno,sparticulars,bdc from inserted commit insert ecapacitor...mth_trn (ldaytrn_id,lgl_id,lacc_id,nentry_id,sdate,snchcltr,damt,nchqno,sparticulars,bdc) select ldtrn, lgl_id,lacc_id,nentry_id,sdate, snchcltr,damt,nchqno,spart,bdc from @tmp begin tran end GO SET ANSI_NULLS OFF GO SET QUOTED_IDENTIFIER OFF GO Best Regards Jay Khatri
-
Using Jet Oledb as linked server and trigger rows from VB6.0Hi I tried all the combinations of commit tran and begin all got failed. Secondly, It is true the access don't have triggers, so do I go for another sql server db instead of ms-access. I think finally I must leave try with MS Jet. Please suggest. Thanks & Best Regards Jay Khatri
-
Using Jet Oledb as linked server and trigger rows from VB6.0If I remove commit and begin trans, it stops working even in sql browser. But not start to work in Vb6.0. My connection string in VB for sql server is "Provider=SQLOLEDB.1;Password=" & CURRENT_Password_sa & " ;Persist Security Info=True;User ID=sa;Initial Catalog=" & CURRENT_DATA & ";Data Source=" & ty My question is if Microsoft Jet oledb insert can be done from sql server why it is not being from vb front end. One more point Is it a problem of begin, commit of transactions. Please reply soon. Thanks & Best Regards Jay Khatri
-
Using Jet Oledb as linked server and trigger rows from VB6.0Hi Experts, I would like to Synchronize MS-Access database from sql server 2005 database realtime. One way was to alter the code and make a separate connection string for MS-access in VB for inserts. But what modifying in code is not allowed. So I have linked the MS-Access using addlinkedserver and established a connection in that and than I have created a trigger in Sql database so that whenever the table of sql will insert it will get inserted in MSAccess too. Its working from sql server browser very well but not working from vb front. Giving error like 'linked server 'ecapacitor' does not support the required transaction interface. My trigger is this: create trigger updmth on day_trn AFTER insert As begin commit insert into ecapacitor...mth_trn (ldaytrn_id,lgl_id,lacc_id,nentry_id,sdate,snchcltr,damt,nchqno,sparticulars,bdc) select ldaytrn_id,lgl_id,lacc_id,nentry_id,sdate,snchcltr,damt,nchqno,sparticulars,bdc from inserted begin tran end Please let me have a solution for this. An quick reply will be highly appreciable. Thanks & Best regards Jay Khatri
-
Update Online MySql Database from Client Side desktop serviceHi experts, How can I update my MySql Database which is online on Windows Server from my local database. One way is to upload the database to the server and than I can make connectionstring. But what if I don't want to upload entire database and just like to insert few flagged rows. Is there any option to make connectionstring from my pc to webserver. I have heard about Soap and webservice but don't know the exact solution. Can anybody help me in this regard. Thanks & Best Regards Jay Khatri
-
Using SMTP client of .net in proxy connections to send emailHi experts, The easiest way to send email .net for smtp clients is using System.Net.Mail Smtpclient. But I would like to send it through ma proxy server which has IP as 192.168.0.1. Is there any way in .net. Please let me know how I will be able to send emails from proxy. I have found lot of apps which provide the mechanism to do so. But I don't like to purchase like to make my own. Thanks & Best Regards Jay Khatri
-
How to create CD Key hardware key and hwo to embed that in Executable file in install timeYes exactly Hardware lock is a gud option but I will not be able to select due to company's policy, cracking exe is also possible, if someone know assembly lang. Even I had cracked Xara 3D for educational purpose. It was as easy as to change je to jre. So will it be better to enter an encrypted code separately. I like to encrypt my software as much as possible. Further I would like to make my exe tamper aware and self die. Thanks for you prompt reply. Jay
-
How to create CD Key hardware key and hwo to embed that in Executable file in install timeobtaining hard disk serial No. and processor will be done there. I was having the code you had suggested. My issue is how will I embed the encrypted code in exe at install time so that any person who copy the exe will not be able to run on his pc and even if someone extract exe from my setup will also fail to do so. I would like to have your comments upon it. Thanks Jay
-
How to create CD Key hardware key and hwo to embed that in Executable file in install timeHi Experts, I would like to capture Harddisk and processor serial No. apply some algorithm over it and generate a new encrypted ID. Further I like to embed this ID to the installed exe. So that it check everytime the same hardware when it run. Can anyone tell this by any example. I am using VS2005 and my project is on Vb.Net. Thanks in advance. Jay Khatri