locked
Problem Regarding GSM modem connection with C# RRS feed

  • Question

  • its me again..

    and i have a new problem..hehehe..

     

     

    remember that database application program i

    mentioned earlier..

    well its actually a gsm modem driven application..

     

    my problem is that my program cant send any outgoing messages

    but it can receive messages thru my interface..

     

    here's my code

    using System;

    using System.Collections.Generic;

    using System.ComponentModel;

    using System.Data;

    using System.Drawing;

    using System.Text;

    using System.Windows.Forms;

    using ASmsCtrl;

    using System.Data.SqlClient;

    namespace WindowsApplication4

    {

    public partial class frmMain2: Form

    {

    private GsmOut objGsmOut;

    private GsmIn objGsmIn;

    private Constants objConstants;

    private frmPinCode fPIN;

    private frmMsgStorage fMsgStore;

    private frmSendingOptions fSendOpt;

     

     

    public frmMain2()

    {

    InitializeComponent();

    objConstants = new Constants();

    objGsmIn = new GsmIn();

    objGsmOut = new GsmOut();

    fPIN = new frmPinCode();

    fMsgStore = new frmMsgStorage();

    fSendOpt = new frmSendingOptions();

    txtResults.Enabled = false;

    dateTimePicker1.Value = DateTime.Now;

    dateTimePicker1.Enabled = false;

    txtFirstName.Text = string.Empty;

    txtLastName.Text = string.Empty;

    txtMobileNo.Text = string.Empty;

    txtMemberID.Text = string.Empty;

    rtxtMessage.Text = string.Empty;

    }

    bool recall = false;

    public bool MainRecall

    {

    set { recall = value; }

    get { return recall; }

    }

    private void btnClear_Click(object sender, EventArgs e)

    {

    txtMobileNo.Text = string.Empty;

    txtResults.Text = string.Empty;

    txtLogging.Text = string.Empty;

    rtxtMessage.Text = string.Empty;

    txtMobileNo.Focus();

    }

    private void frmMain2_Load(object sender, EventArgs e)

    {

    // TODO: This line of code loads data into the 'database1DataSet1.MembersContact' table. You can move, or remove it, as needed.

    this.membersContactTableAdapter.Fill(this.database1DataSet1.MembersContact);

    // TODO: This line of code loads data into the 'database1DataSet1.SMS_Inbox' table. You can move, or remove it, as needed.

    this.sMS_InboxTableAdapter.Fill(this.database1DataSet1.SMS_Inbox);

    System.Int32 a;

    for (a = 0; a < objGsmOut.GetDeviceCount(); a++)

    {

    cmbDevice.Items.Add(objGsmOut.GetDevice(a).ToString());

    }

    for (a = 1; a < 9; a++)

    {

    cmbDevice.Items.Add("COM" + a.ToString());

    }

    cmbDeviceSpeed.Items.Add("1200");

    cmbDeviceSpeed.Items.Add("2400");

    cmbDeviceSpeed.Items.Add("9600");

    cmbDeviceSpeed.Items.Add("19200");

    cmbDeviceSpeed.Items.Add("38400");

    cmbDeviceSpeed.Items.Add("57600");

    cmbDeviceSpeed.Items.Add("115200");

    cmbDevice.SelectedIndex = 0;

    cmbDeviceSpeed.SelectedIndex = 0;

    txtLogging.Text = System.IO.Path.GetTempPath() + "GsmLog.txt";

    }

    private void btnSend_Click(object sender, EventArgs e)

    {

    System.Int32 SMSType = 0;

    Cursor c = Cursor.Current;

    Cursor.Current = Cursors.WaitCursor;

    btnSend.Enabled = false;

    txtResults.Text = "Sending Message....";

    txtResults.Refresh();

    //sets-up the device

    objGsmOut.Device = cmbDevice.Text;

    //logfile setup

    objGsmOut.LogFile = txtLogging.Text;

    //device speed initialization

    if (cmbDeviceSpeed.SelectedIndex == 0)

    {

    objGsmOut.DeviceSpeed = 0;

    }

    else

    {

    objGsmOut.DeviceSpeed = System.Int32.Parse(cmbDeviceSpeed.Text);

    }

    //SMS Type Identification

    if (fSendOpt.UnicodeSMS == true)

    {

    SMSType = objConstants.asMESSAGETYPE_UNICODE;

    if (fSendOpt.MultiSMS == true)

    {

    SMSType = objConstants.asMESSAGETYPE_UNICODE_MULTIPART;

    }

    if (fSendOpt.Display == true)

    {

    SMSType = objConstants.asMESSAGETYPE_UNICODE_FLASH;

    }

    }

    else

    {

    if (fSendOpt.UnicodeSMS == false)

    {

    SMSType = objConstants.asMESSAGETYPE_TEXT;

    if (fSendOpt.MultiSMS == true)

    {

    SMSType = objConstants.asMESSAGETYPE_TEXT_MULTIPART;

    }

    if (fSendOpt.Display == true)

    {

    SMSType = objConstants.asMESSAGETYPE_TEXT_FLASH;

    }

    }

    }

    //Configure recipient

    objGsmOut.MessageRecipient = txtMobileNo.Text;

    //Modify SMS Parameters

    objGsmOut.MessageData = rtxtMessage.Text;

    //Modify SMS type

    objGsmOut.MessageType = SMSType;

    //Send SMS

    objGsmOut.Send();

    //Show Results of transaction

    if (objGsmOut.LastError == 0)//if the msg is successfully sent..the sms content will be saved in my database

    {

    try

    {

    SqlConnection connect = new SqlConnection();

    connect.ConnectionString = "Data Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirectory|\\Database1.mdf;Integrated Security=True;User Instance=True";

    connect.Open();

    SqlCommand cmd = new SqlCommand();

    cmd.CommandText = "StoreMessages";

    cmd.CommandType = CommandType.StoredProcedure;

    cmd.Connection = connect;

    cmd.Parameters.Clear();

    cmd.Parameters.Add("@MemberID", SqlDbType.Int);

    cmd.Parameters["@MemberID"].Value = txtMemberID.Text;

    cmd.Parameters.Add("@MobileNo", SqlDbType.VarChar, 50);

    cmd.Parameters["@MobileNo"].Value = txtMobileNo.Text;

    cmd.Parameters.Add("@SMS_Type", SqlDbType.VarChar, 50);

    cmd.Parameters["@SMS_Type"].Value = "Sent SMS Item";

    cmd.Parameters.Add("@SMS_Date", SqlDbType.DateTime);

    cmd.Parameters["@SMS_Date"].Value = dateTimePicker1.Value;

    cmd.Parameters.Add("@SMS_Content", SqlDbType.VarChar, 160);

    cmd.Parameters["@SMS_Content"].Value = rtxtMessage.Text;

    cmd.ExecuteNonQuery();

    connect.Close();

    txtResults.Text = "Sending Successful...Message sent";

    rtxtMessage.Text = string.Empty;

    txtMobileNo.Text = string.Empty;

    txtLastName.Text = string.Empty;

    txtFirstName.Text = string.Empty;

    dateTimePicker1.Value = DateTime.Now;

    }

    catch (Exception ex)

    {

    MessageBox.Show(ex.GetBaseException().ToString(), "Connection Status");

    }

    }

    else

    {

    txtResults.Text = "An error occured...Sending failed" + objGsmOut.LastError + "(" + objGsmOut.GetErrorDescription(objGsmOut.LastError) + ")";

    }

    btnSend.Enabled = true;

    Cursor.Current = c;

    }

    private void btnSettings1_Click(object sender, EventArgs e)

    {

    fSendOpt.ShowDialog();

    }

    private void btnSettings2_Click(object sender, EventArgs e)

    {

    fMsgStore.ShowDialog();

    }

    private void btnReceive_Click(object sender, EventArgs e)

    {

    ListViewItem Component;

    Cursor c = Cursor.Current;

    Cursor.Current = Cursors.WaitCursor;

    listView1.Items.Clear();

    btnReceive.Enabled = false;

    objGsmIn.Device = cmbDevice.SelectedItem.ToString();

    objGsmIn.LogFile = txtLogging.Text;

    if (cmbDeviceSpeed.SelectedIndex == 0)

    {

    objGsmIn.DeviceSpeed = 0;

    }

    else

    {

    objGsmIn.DeviceSpeed = System.Int32.Parse(cmbDeviceSpeed.Text);

    }

    objGsmIn.Storage = fMsgStore.MsgStorage;

    if (fMsgStore.DelMsg == true)

    {

    objGsmIn.DeleteAfterReceive = 1;

    }

    objGsmIn.Receive(); //this checks your new incoming messages?

    if (objGsmIn.LastError == 0)

    {

    objGsmIn.GetFirstMessage();

    while (objGsmIn.LastError == 0)

    {

    Component = listView1.Items.Add(objGsmIn.MessageSender);

    Component.SubItems.Add(objGsmIn.MessageData);

    objGsmIn.GetNextMessage();

    }

    txtResults.Text = "Successful";

    }

    else

    {

    txtResults.Text = "Error" + objGsmIn.LastError + "(" + objGsmIn.GetErrorDescription(objGsmIn.LastError) + ")";

    }

    btnReceive.Enabled = true;

    Cursor.Current = c;

    }

    private void btnBrowse_Click(object sender, EventArgs e)

    {

    if (System.IO.File.Exists(txtLogging.Text.ToString()))

    {

    System.Diagnostics.Process.Start(txtLogging.Text);

    }

    }

    private void txtLogging_TextChanged(object sender, EventArgs e)

    {

    }

    }

    }

     

     

    //by the way i used the active xperts sms toolkit to construct my program..

    i wish you could help me out...AGAIN..guys

    i really appreciate all the help..

     

    tnx in advance!!

    Monday, April 30, 2007 5:51 AM

Answers

  • hi dave..

    well apparently i've managed to fix this glitch problem i posted earlier..

     

    regrading your question my gsm modem unit

    is this thing called teltonika t-modem gsm modem..

    it's quite new actually and it is connected to my PC thru a usb port..

     

    my problem now is that

    i can,t seem to get the hang in storing received messages in

    my SQL database..

    the code goes like this..

    a receive button is clicked to generate an instance

    where all SMS sent to my sim card would then be accessed by my gsm modem..

     

    private void btnReceive_Click(object sender, EventArgs e)

    {

    ListViewItem Component;

    Cursor c = Cursor.Current;

    Cursor.Current = Cursors.WaitCursor;

    listView1.Items.Clear();

    btnReceive.Enabled = false;

    objGsmIn.Device = cmbDevice.SelectedItem.ToString();

    objGsmIn.LogFile = txtLogging.Text;

    if (cmbDeviceSpeed.SelectedIndex == 0)

    {

    objGsmIn.DeviceSpeed = 0;

    }

    else

    {

    objGsmIn.DeviceSpeed = System.Int32.Parse(cmbDeviceSpeed.Text);

    }

    objGsmIn.Storage = fMsgStore.MsgStorage;

    if (fMsgStore.DelMsg == true)

    {//deletes your message after receiving

    objGsmIn.DeleteAfterReceive = 1;

    }

    objGsmIn.Receive(); //this checks your new incoming messages

    if (objGsmIn.LastError == 0)

    {

    objGsmIn.GetFirstMessage();

    while (objGsmIn.LastError == 0)

    {

    //continously receive all messages..

    Component = listView1.Items.Add(objGsmIn.MessageSender);

    Component.SubItems.Add(objGsmIn.MessageData);

    objGsmIn.GetNextMessage();

    }

    txtResults.Text = "Messages Successfully Received..";

    }

    else

    {

    //error in message receiving process..

    txtResults.Text = "Error " + objGsmIn.LastError + "(" + objGsmIn.GetErrorDescription(objGsmIn.LastError) + ")";

    }

    btnReceive.Enabled = true;

    Cursor.Current = c;

    }

     

    now my problem is that i cant figure out where i would place my stored procedure

    in storing those messages to my database..

     

    the problem is that..

    if i place my stored procedure on the 1st "IF" statement..

    it will only save my 1st incoming message..

     

    but another thing is that if i put it under my "WHILE" statement..

    dont you think that it will continiously loop?

    meaning to say that the next tym i tried to access all my received messages

    it would definitely store all the previously read messages again to my database..

    which then creates multiple copies of my previously stored messages again and again

     

    well i hope you get the gist of what i mean..

    its quite complicated to explain..

    but hten again thanks a lot for taking notice on my post regarding this..

    thanks!!^_^

    Tuesday, May 8, 2007 5:02 AM

All replies

  • This is the wrong forum for those questions, you should try another forum dedictaed to c#.

    Jens K. Suessmeyer.

    ---

    http://www.sqlserver2005.de
    ---

    Monday, April 30, 2007 10:01 AM
  • Thread moved.
    Monday, April 30, 2007 10:02 AM
  • Just two references with good solutions.

     

    Traffic on GSM Modem 
     
    COM1 Problem when using Readfile function

     

    Thursday, May 3, 2007 7:45 AM
  • hi tophee,

    still working on that project? what gsm modem unit are you using?

    Tuesday, May 8, 2007 2:18 AM
  • hi dave..

    well apparently i've managed to fix this glitch problem i posted earlier..

     

    regrading your question my gsm modem unit

    is this thing called teltonika t-modem gsm modem..

    it's quite new actually and it is connected to my PC thru a usb port..

     

    my problem now is that

    i can,t seem to get the hang in storing received messages in

    my SQL database..

    the code goes like this..

    a receive button is clicked to generate an instance

    where all SMS sent to my sim card would then be accessed by my gsm modem..

     

    private void btnReceive_Click(object sender, EventArgs e)

    {

    ListViewItem Component;

    Cursor c = Cursor.Current;

    Cursor.Current = Cursors.WaitCursor;

    listView1.Items.Clear();

    btnReceive.Enabled = false;

    objGsmIn.Device = cmbDevice.SelectedItem.ToString();

    objGsmIn.LogFile = txtLogging.Text;

    if (cmbDeviceSpeed.SelectedIndex == 0)

    {

    objGsmIn.DeviceSpeed = 0;

    }

    else

    {

    objGsmIn.DeviceSpeed = System.Int32.Parse(cmbDeviceSpeed.Text);

    }

    objGsmIn.Storage = fMsgStore.MsgStorage;

    if (fMsgStore.DelMsg == true)

    {//deletes your message after receiving

    objGsmIn.DeleteAfterReceive = 1;

    }

    objGsmIn.Receive(); //this checks your new incoming messages

    if (objGsmIn.LastError == 0)

    {

    objGsmIn.GetFirstMessage();

    while (objGsmIn.LastError == 0)

    {

    //continously receive all messages..

    Component = listView1.Items.Add(objGsmIn.MessageSender);

    Component.SubItems.Add(objGsmIn.MessageData);

    objGsmIn.GetNextMessage();

    }

    txtResults.Text = "Messages Successfully Received..";

    }

    else

    {

    //error in message receiving process..

    txtResults.Text = "Error " + objGsmIn.LastError + "(" + objGsmIn.GetErrorDescription(objGsmIn.LastError) + ")";

    }

    btnReceive.Enabled = true;

    Cursor.Current = c;

    }

     

    now my problem is that i cant figure out where i would place my stored procedure

    in storing those messages to my database..

     

    the problem is that..

    if i place my stored procedure on the 1st "IF" statement..

    it will only save my 1st incoming message..

     

    but another thing is that if i put it under my "WHILE" statement..

    dont you think that it will continiously loop?

    meaning to say that the next tym i tried to access all my received messages

    it would definitely store all the previously read messages again to my database..

    which then creates multiple copies of my previously stored messages again and again

     

    well i hope you get the gist of what i mean..

    its quite complicated to explain..

    but hten again thanks a lot for taking notice on my post regarding this..

    thanks!!^_^

    Tuesday, May 8, 2007 5:02 AM
  • hey tophee,

    that's a nice piece of hardware you have there. i have two of them over here. we might be using different libraries as to manipulating the data but the idea should be something like this:

    1. read the new message instance
    2. store it in the database
    3. delete the message from the sim to prevent them from clogging there.

    you should have a function to auto read new messages so that they will be stored in the db immediately when they arrive.

    have you tried gsmcomm? it's the library i'm using, if you're willing to try it, i'll paste some code here, or you can check the thread: Traffic on GSM Modem

    say, where are you from? lol

    dave.
    Tuesday, May 8, 2007 9:25 AM
  • dave its me again..

    im actually using an active xperts sms toolkit library

    in order to manipulate the content of my application..

     

    as you can see in my code there's a part for each of your given steps..

     

    1 would be the object.receive() -->this actually serves as my SMS reader from the sim card..

     

    your step 2 would be my "Missing Part" in my program..^_^

     

    part 3 of your steps is actually optional for me..in my application its only optional

    to delete the message after reading and receiving it..

     

    looking at your instructions actually gave me some idea on how to tackle

    my problem..(but not on the database part..im a long way from there..^_^)

     

    but geez..what can i say..your post does help..thanks a lot pal!!

    and yeah,by the way..bout that part where i am from??

    im a filipino..i reside in the philippines..

    and im such a wimpy wuss newbie when it comes to programming..lol

     

    about that gsmcomm thing..

    i wish i could've tried it

    but the problem is..changing my library

    would be like giving my program a complete overhaul..^_^

    but i will try that one as a seperate program..if i still have the time..

     

    hehehe..thanks again dude!!

    that post do help a lot..peace!!

    Thursday, May 10, 2007 8:41 AM
  • hey tophee,

    glad to be of help.

    that sms toolkit also gave me a headache when i started with my sms portal project. when i found out about gsmcomm, i droppped it and moved on heheh.

    what about the database part? i'd be willing to share stuff with you if you want. i've already tried MS SQL Server, MySQL and db4o on the application.

    is this for thesis?


    i'm from the philippines too, land of sms haha.

    dave.

    Friday, May 11, 2007 1:59 AM
  • hi dave..again..^_^

     

    apparently the thing that bugs me

    is as to where i will place my sql command in my code..

     

    actually i can save in my database all sent and out going messages..

    trouble is when it comes to storing received messages..thats where

    conflict literally comes out..

     

    here's a simpller question..if you could help

    being the good samaritan that you are..lol(^_^)...

    here goes..

     

    question:

     

    all my received messages can be viewed thru a listview component..

    the mobile no. is the main item..and the sub-item would be the SMS content..

     

    now the question..

    how can i save a record?

    to give you a better idea here's a sample:

     

    when saving a textbox's content to my DB..

    we have this code right?

    cmd.Parameters.Add("@MobileNo", SqlDbType.VarChar, 50);

    cmd.Parameters["@MobileNo"].Value = txtMobileNo.Text;

     

    and in a datetimepicker component we have this line of code..

    cmd.Parameters.Add("@SMS_Date", SqlDbType.DateTime);

    cmd.Parameters["@SMS_Date"].Value = dateTimePicker1.Value;

     

    now my problem is..how can i save a listview content?

    (eg..1st column with Mobile no.(main Item) and message content(subitem) can be saved as a 1 record..and all succeeding columns will be saved individually)

     

    this problem got me really ticked off cos' man..

    i used up all my "STUCK" knowledge in c#

    but still no go..

     

     

    i hope you can help me figure this out dude..

     

    i have a newer problem on hand..
    can i compare the content of the records stored in my database?

    you see what happens is that
    i can now save the last message received on my modem..

    the problem is that once i click again mthanks people..y receive button
    iit will store again my record regardless whether it already exists or not..
    what i want is everytime i access the sim card a condition will compare whether the message content of
    my currently received messages already exists..

    if the record do not exists then i can proceed on saving that record..
    if on the other hand it already exists then the connection will be closed immediately..or on otyher words..
    that record will never be stored again since it already is in my database..

    help guys..


    thats my problem now..sheesh..this is so hard and frustrating..T_T

    i hope someone can help me..

    because im running out of tym..thanks to everybody here..
    i owe all of you quite a lot..

     

    another thing..yep..philippines sure is an icon when it comes to SMS..lol

    i'm just an incoming 4th yr. college student..

     

    how i wish this could be my thesis..

    problem is..well..my adviser already chose a topic for us..

     

    this application is actually a "project" requirement for

    my OJT..glad to hear from you dude..

    pls. reply as soon as you can..thanks again..

     

    you sure know this stuff eh?!

     

    *boy..all this english-ing stuff makes me woozy...^_^*

    Friday, May 11, 2007 2:39 AM
  • hey tophee,

    you can access your listview items by the selecteditem property of a listview object.

    try listview1.selecteditems[0].text, this is the first column the you have selected.
    try listview1.selecteditems[0].subitems[1].text, this is the second column.

    you'll have to save those values to your db.

    by the way, that's a nice ojt project. in what company are you assigned to?

    dave.
    Friday, May 11, 2007 8:27 AM
  •  

    objGsmIn.Receive(); //this checks your new incoming messages?

    if (objGsmIn.LastError == 0)

    {

    objGsmIn.GetFirstMessage();

    while (objGsmIn.LastError == 0)

    {

    //continously receive all messages..

    Component = listView1.Items.Add(objGsmIn.MessageSender);

    Component.SubItems.Add(objGsmIn.MessageData);

    objGsmIn.GetNextMessage();

    }

    txtResults.Text = "Messages Successfully Received..";

    try

    {

    SqlConnection connect = new SqlConnection();

    connect.ConnectionString = "Data Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirectory|\\Database1.mdf;Integrated Security=True;User Instance=True";

    connect.Open();

    SqlCommand cmd = new SqlCommand();

    cmd.CommandText = "StoreMessages";

    cmd.CommandType = CommandType.StoredProcedure;

    cmd.Connection = connect;

    cmd.Parameters.Clear();

    cmd.Parameters.Add("@MobileNo", SqlDbType.VarChar, 50);

    //this specifies to convert the message sender's number into string format..

    cmd.Parameters["@MobileNo"].Value = objGsmIn.MessageSender.ToString();

     

    cmd.Parameters.Add("@SMS_Type", SqlDbType.VarChar, 50);

    cmd.Parameters["@SMS_Type"].Value = "Received SMS";

     

    cmd.Parameters.Add("@SMS_Date", SqlDbType.DateTime);

    cmd.Parameters["@SMS_Date"].Value = dateTimePicker1.Value;

     

    cmd.Parameters.Add("@SMS_Content", SqlDbType.VarChar, 160);

    //this specifies to transpose the message content into string format

    cmd.Parameters["@SMS_Content"].Value = objGsmIn.MessageData.ToString();

     

    cmd.ExecuteNonQuery();

    connect.Close();

    }

    catch (Exception ex)

    {

    MessageBox.Show(ex.GetBaseException().ToString(), "Connection Status");

    }

    }

    else

    {

    //error in message receiving process..

    txtResults.Text = "Error " + objGsmIn.LastError + "(" + objGsmIn.GetErrorDescription(objGsmIn.LastError) + ")";

    }

    btnReceive.Enabled = true;

    Cursor.Current = c;

     

    this is actually my code

    in storing received messages..

    problem is that record duplication is inevitable in my program structure..

     

    hmm..to cite an example..

    if i access once my modem..all received messages is stored to my DB

    but if i stop my program and rerun it..

    the program also copies all messages received regardless whether

    its already stored in my DB or not..

     

    my question is that.s

    is it possible to have a 

    cndition like this?

     

    if(record already exists in my database)

    dont save

    else

    {

    open sql connection and save all new messages received..

    }

     

    in order to specify thing a little bit better for you..

    i hope you can help me figure out

    how i can create a condition that compares the content of my DB "SMS_Content" attribute

    to all incoming messages..

    if the content of the incoming message is already existing in my DB

    then i no longer have to save it

    otherwise save the new SMS_content in my DB

     

    hope this can give you at least a vague idea how i want things to

    work out in my program..

     

    thanks a lot dude..i owe you another one..^_^

    i'm currently taking my OJT in this company..

     

    Systems and Software Consulting Group Inc.

    its located in Gil Puyat in Makati..

     

    hyuck hyuck..so distressing

    im just a newbie but i have to meet the requirements

    of this project...*sigh*

     

    hehe..thanks again..^_^

    Friday, May 11, 2007 9:55 AM
  • tophee,

    you'll have to search if the current message string exists in your db. if your table has two columns, say senderid and message, your sql statement should be something like: select message from tablename where message = your new text message. if your query returns false, store it, else, don't store it.

    as to the first issue, when turning on/off your application, you should have some way to determine whether a message in the sim or phone has been read or not. does your library have something for marking messages if they're read or unread? another loophole to avoid this is after storing/reading the new message, delete it from the sim/phone memory.

    dave.
    Monday, May 14, 2007 4:47 AM
  • dave,

     

    dude my boss is'nt actually fond of me

    employing the kind of scheme that you suggested..(so frustrating..T_T)

    apparently he says that it will be quite "time consuming"

    to implement such searching..

    but i'm all for it to tell you the truth

    but he just ai'nt that in to it..

     

    but i tried it and it helps..

    for thta marking messages issues..

    well there's no such option in my application..(*sigh*)

     

    but i decided to make the "Delete message after storing" function as a default and no

    longer an option..

    well is this practical?

    or should i stick to my earlier plans?

    i'm really sorry for bothering you

    with this kind of stuff..

    but dude you're just the man for the job..lol..^_^

     

    thanks again man...

    *sigh*..good thing my OJT is almost through..

    Wednesday, May 16, 2007 2:44 AM
  • hey tophee,

    tell your boss that patience is a virtue lol.

    err one question, what's the reason why you don't want similar sms saved in your db?

    in my experience, deleting after storing the sms is very practical. here are things to consider:

    the volume of sms to be received by your application/sim is random, there's no exact info on how much sms will you receive in a certain period of time. you won't be able to set when the application will delete your inbox to give way for new sms. after your sim's memory is full, it won't be able to receive new sms thus you're losing valuable data. this will also display an error telling there's something wrong with your gsm modem, not that your sim card is full, noooh! trust me, i had my fair share of headaches before figuring this out too lol.

    what does this app exactly do? if it only receives sms, is it some kind of survey, chat-tv or polling service?

    dave.
    Wednesday, May 16, 2007 3:37 AM
  • dave,

     

    how i wish i could tell him that..

    my application is both used for sending and receiving data..

    my only problem now is that records are duplicated..

    i mentioned that problem to you earlier right?

     

    yup i will just set things up the "practical" way..

    and i gues i'll just have to delete unnecessary records i suppose?

    i hope my boss won't skin me alive on this..heheh..wish me luck pal..

     

    just have to wait (*wheeze*) just (*gasp*) 7 more (*can't breathe*) days to get this through...^_^

    hehe..nice to get some answers from you dude..

    i owe you a lot man..thanks again..

     

    this one's for the people..aja aja!!!^_^

    Thursday, May 17, 2007 3:32 AM
  • hey tophee,

    glad to be of help to you.

    unless there's another solution to that duplication issue, checking the db if it exists is the only method that i'm aware of. is the reason for not storing similar text messages justified? anyways, you can do it dude.

    good luck.!

    dave.
    Thursday, May 17, 2007 3:04 PM
  • hey dave,

     

    thanks to that opinion of yours

    i try to justify that point

    but some people are so hardheaded

    when it comes to their own opinions..

     

    hehe

    anyway i managed to give out good vibes when

    i presented this to my boss..

     

    and because of that i have another problem (or should i say problems? ^_^)

    here are some of my questions..

     

    1. how can i concatenate my tables attribute and then place them on a textfield?

    eg. i have attribute "first name" and "last name" in my table..my question is how i can concatenate both attribute's respected values

    then place them in my textbox..

     

    2.for example..i have the string "studinfo 1" in my textbox..my question is how can i identify the muber "1" among all those characters?

    i'm supposed to use this function in order to provide a reply to a query by the user inquiring about student number "1"

    i hope you can help me out AGAIN for the nTH time..lol

     

    hehehe..thanks again man..

    you sure are a lifesaver

     

    Monday, May 21, 2007 3:54 AM
  • hey tophee,

    are they looking for somebody to work on that with you? hahaha *raises hands

    anyway, hmm how do you retrieve your table data attributes?

    #1 should be something like: yourTextBox.text = firstnamedata + " " + lastnamedata;
    your textbox would display "tophee lastname".

    #2 what exact string or character are you looking for? are you going to be the one to supply what string to look for? if yes, you can use the Contains method of a string.

    yourTextBox.Text.Contains(yoursearchstring/character);

    more info on the Contains method
    here. it'll also help if you can give a more complete sample string so we can see if we can use other methods as well.

    dave.
    Monday, May 21, 2007 6:42 AM
  • hello dave..

    this is my email address: spawn_breath05@yahoo.com
    thanks for considering my request..

    just send me message anytime ok?
    thanks again..
     
    Friday, July 20, 2007 9:52 AM
  • hey tophee, what's your email address? let's talk there
    Monday, July 23, 2007 2:16 AM
  • I'll help you a bit with move to e-mail by locking down this off topic thread.

    Monday, July 23, 2007 6:32 AM