Hi, I would like to design an application to allow shoppers to check if the stocks they have in mind have arrived in a stall. I have to use a modem which acts as the stall's SMS center and use SMS to test the program. To find out availability of stocks, the user will have to SMS to the SMS centre to specify stocks details such as: • Model / Type • Quantity • Size • Colour Customers just have to wait for the SMS centre to notify them that the stocks have arrived. Their specified stock requests as well as their contact details are automatically stored in the database system. Staff will update the database when new stocks have arrived and the consumers will be untomatically notified once the database finds a match between customers’ request and stocks’ availability. Customers can also easily change their requests at any time through the use of SMS. How do i start to put this idea into codes? Thank you!
nidhelp
Posts
-
how to automatically notify user when database finds a match? -
Get data from Access instead of notepad (urgent)Hi hi, If it's using oledbadapter and dataset, i know how to use them and query for data from Access. However, what i need now is how do i automatically store the data downloaded into Access instead of storing in Notepad? How do i get every set of downloaded data to append to my Access db table?? Thank you!!
-
Get data from Access instead of notepad (urgent)Hi I want to get data from Access instead of notepad. Here are the codes to get data from notepad by entering IC number (equivalent to ID number). The records are stored in 'Folder'.
public void btnGo_Click_1(object sender, System.EventArgs e)// -->User can select the file by entering the IC Nunber in textbox and program will check for file existence and null file { enable(); /** [Retrieve IC Number from tboxEnterICNo] **/ strFileName2 = tboxEnterICNo.Text; path = @"Folder\"+strFileName2+".txt"; /** [Check for file existence] **/ if(File.Exists("Folder\\"+strFileName2+".txt"))// -->If file exists, open DisplayGraph form and display the graph { displaygraph.names = path;// -->copies the path to DisplayGraph form displaygraph.ShowDialog();// -->Opens DisplayGraph form to display graph }//End of if-condition else { MessageBox.Show("File does not exist! Please create a new profile.", "Invalid File Type", MessageBoxButtons.OK, MessageBoxIcon.Error ); }// -->End of else-condition }// -->End of btnGo_Clicks module
How should i go about to keep the records in Access and also specify retrieving of the queried data from an Access table instead? I need some help about what to do and how the codes look like. Thank you very much! :) -
Urgent question about Updatesok... so do u mean i should change 'Indexed' back to 'No' for all of the 4 fields? please pardon me, but where and how do i change my codes? here's how i got my data to show in datagrid: i used the VS.net dataform wizard to generate dataadapter and dataset... then i go to configure dataadapter and add in the Where clause... i mananged to query by id and pwd, but cant update properly... i already generated all the commands successfully using oledbadapter... i donno where's wrong and what to change... please help me... it's urgent... thankful for your advice!
-
Urgent question about UpdatesHi I have 4 fields as my pk in access db.. I query for data in VS.NET 2003. I query by id AND pwd.. I can view the data in datagrid, but not update properly. When i update it says: The changes you requested to the table were not successful because they would create duplicate values in the index, pk, or relationship. Change the data in the field or fields that contain duplicated data, remove the index, or redefine the index to permit duplicate entries and try again. I tried to solve the problem by going to access db and changed the 'Indexed' properties (of the 4 fields i used as my pk) from 'No' to 'Yes (Duplicates OK)'. but still i get the same error when i edit values in datagrid and click on update. Something puzzling is, when i click on view button after i update, i can see the latest AND first updated entry in my datagrid and access db. The previously edited data is changed back to the original value again. so what im saying is, eg. row1) 4 row2) 4 row3) 4 I changed row2) from 4 to 5 and press update. the error msg is shown. then, i press View button. i see: row1) 4 row2) 5 row3) 4 Now i change row3) from 4 to 3. again, error is shown. now i see: row1) 4 row2) 4 row3) 3 I tried playing with it, i update both row1) and row2) at the same time. I changed row1) to 5 and row2) to 6 and i see: row1) 5 row2) 4 row3) 4 What's happening and what must i do exactly?? Please help asap. Thank you!
-
how to prevent duplicate file in Access db?yes, yes.. that's what i want to do (to check if that id is already in my database) how do i do that? also, how to check for repeated data just based on three particular fields though i've other fields in that row... that means if 1 or 2 of the particular fields are repeated data, it's not considered as duplicates. but if all three of the particular fields have repeated data, it IS duplicate and how can i prevent that?? lastly, how to check for repeated data if based on all fields on a row?? meaning, all fields are the same then it's considered duplicate. thank you for your time! =)
-
how to prevent duplicate file in Access db?hi how do i make sure that user cannot create New Customer Profile if there's already one in Access database? thanks
-
how can i update to access db??i think i should tell you this: i learnt that a missing primary key in my db table might be the cause for my failure to generate the UpdateCommand. i'll be using table2's data to generate the UpdateCommand. hence i tried to add a pk, but i could not save my changes. (error is something like this: saving will cause duplicate pk) well, i suppose it's because i already had a pk (IDno )in table1, and what i was trying to do was to let IDno in table2 be pk as well. in the end, i have only one pk (IDno in table1). i meant to let IDno be pk in all of my tables... is this possible?? one thing to note: i used oleDbDataAdapter to generate commands using table1 and all the commands were successfully generated. i think i succeeded because i've a pk in table1, am i right?? hope that's helpful for you to understand my problem.. please help me... i donno how i should rectify the problem (to make an UpdateCommand for table2 and be able to update back to Access db). thanks for reading.
-
how can i update to access db??considering that i only used oleDbAdapter and generated select command, i run my app and query for data from Access db. i then make some changes to the data that are retrieved and displayed in my dataGrid, and i press the update button. update button: private void button3_Click(object sender, System.EventArgs e) { try { oleDbDataAdapter1.Update(dataSet51); MessageBox.Show("Database Updated"); } catch (Exception exceptionObject) { MessageBox.Show(exceptionObject.Message); } } error message: Update requires a valid UpdateCommand when passed DataRow collection with modified rows well i suppose the reason is because i failed to generate the update command using oleDbDataAdapter right?? in that case, what do i do? i do not know how to use a commandbuilder. can you please tell me what to do? thank you! =)
-
how can i update to access db??hi im using VS .net, MS Access and c# language. basically i tried to do an update command using oleDbDataAdapter and commandbuilder. i also searched for tutorials but i still cant get things going. could someone please tell me how come i couldnt generate update and delete commands using oleDbDataAdapter? i managed to do select command and my parameterized query is working well. i just want to do an update now. what other ways are there for me to do this and also ensure that the changes return correctly to the place that i queried from? if possible, i hope i can do this in IDE instead of programmatically. as im a novice, please pardon me and help me with some step by step instructions whenever possible. thank you. are there any simple walkthrough tutorials that i can follow to accomplish my entire update task? i appreciate it if you could provide me with sample codes or just anything helpful. time's running out... hope to get update going asap.. thanks a lot to all of you! =)
-
OleDbdataAdapter>> Could not determine which columns uniquely identify the rows for ...oh yes, i forgot to mention about the error i got in Access. i've a field named IDno and this field is added to each and every of my tables. is it ok or correct to let all tables have IDno as pk? i thought it's ok so i tried.. i let table1 have IDno as pk. but then when i tried to let IDno be pk in table2, it gives me error regarding duplicate pk so im stuck now... if i dont use IDno, i donno what is best used as primary key in table2 and the rest of my tables. there's a button on the toolbar called Index Name, so i typed "PrimaryKey" and selected "IDno", hoping that through this way, perhaps table2 can have IDno as pk. does this way make IDno a pk? i doubt so.. i doubt so because if IDno is made to be a pk in my table now, how come i still get the same error as before i tried typing "PrimaryKey" and selecting "IDno" in Index Name? the error is: Could not determine which columns uniquely identify the rows for "table2". for table1, things are fine, i used OleDbAdapter and generated all the statements successfully. but doing this table2 gives me error, i just want to use OleDbAdapter to build update and delete functions too. i donno why it failed. it succeeded in generating Select and Insert statements... so what's wrong? i really have no idea what's wrong. please help. i really need some guidance. thanks! -- modified at 3:08 Tuesday 30th August, 2005
-
OleDbdataAdapter>> Could not determine which columns uniquely identify the rows for ...hi i just want to configure my adapter such that i can update information to Access db. but i got this error from the OleDbdataAdapter>> Could not determine which columns uniquely identify the rows for.... i already spent the past few hours finding online solutions but to no avail, mainly because the forum dicussions stopped halfway and the language is not the same as mine. just to check with you: since i can already get the selected data out from db using parameterized query, does that mean that if i can update successfully, my updates will return to the EXACT table fields it came from? please, please help me to get this part going.... it's urgent! i really appreciate any help! thanks in advance! -- modified at 5:20 Monday 29th August, 2005
-
password problemsanother problem is i have these 3 columns AdministratorPwd, YourPassword and userID as part of my Access db table. typing in the 2 textboxes (AdministratorPwd and CustomerID) OR (YourPassword and CustomerID) is supposed to query the db for the same piece of data, that is, i should be able to get data belonging to this particular Customer whether i type (AdministratorPwd and CustomerID) OR (YourPassword and CustomerID). For eg, i want to view info regarding customerA so i type AdministratorPwd and CustomerID --> admin and CustomerA or i can also type YourPassword and CustomerID --> workerA and CustomerA. however, when i use querybuilder to write ........ WHERE AdministratorPwd=? OR YourPassword=? AND CustomerID=? I get errors--> Password is not in parameter collection and also i'll be getting CustomerB or some other customer's info from db.
-
password problemshi i got error when i tried StrComp Function --> Select * From Customers Where StrComp('ContactName','anyNamE',0)=0. it says something about YourPassword is not in Parameter collection. indeed it's not there. this line is what i wrote in OKbutton click event: oleDbDataAdapter2.SelectCommand.Parameters["YourPassword"].Value = textBox2.Text; well, i tried to remove that line, but what i typed in password textbox did not successfully sense correct password (eg. hELLo23) and retrieve data from Access and display. It's supposed to sense hELLo23 from hello23 or HELLO23 or any other inputs that are different from that (hELLO23) in my database. i also tried to do this --> Select * From Customers Where StrComp('ContactName','anyNamE',2)=2 as msdn says write '2' for Microsoft Access only. Performs a comparison based on information in your database. but it seems no difference as writing '0'. loading of data is fine if i do this --> oleDbDataAdapter2.SelectCommand.Parameters["ID_Number_"].Value = textBox1.Text; oleDbDataAdapter2.SelectCommand.Parameters["YourPassword"].Value = textBox2.Text; dataSet41.Clear(); oleDbDataAdapter2.Fill(dataSet41); if(this.BindingContext[dataSet41, "Table1"].Count == 0) { MessageBox.Show("Error Occured"); textBox1.Focus(); } the only problem is that it's not case-sensitive in password textbox and it shows data even though password case is not the same as db. i just want to ensure that for password any wrong case will not let user have access to get the data. thanks a lot!
-
password problemshi im doing parameterized query whereby the user has to enter id and password. im using access database to store my data and using visual studio .net 2003 to build my app. if the id n password match, data is retrieved. i need help to ensure that password typed is of the exact case as stored in database. that means, if password in database is hELLo23 the user cannot access if he types hello23. how do i do that? second problem is how can i make it such that user types in password and the password appears like this ********? finally, how do i let password in database appear in encrypted text so that it is impossible to see the password in text format? i read about hash... do i use that? can i have more details? thanks! =)
-
parameterized queryhi there, thanks for replying! good, just learnt something from u =) --> Just type something with a ' in there and you code will blow up however, what i need help in is i cant load my data well if i were to SEPARATE "Search Controls" (textbox and button for query --> to get data belonging to person with a certain ID no.) with "Textbox Controls" (that is, data is to be loaded into these "Textbox Controls" placed in form2). im able to retrieve selected data when i place "Search Controls" and "Textbox Controls" on the same form but this is not what i want. thanks!
-
parameterized queryhi im sure glad u replied. sorry for the late reply. just got home. anyway, i just had a look at the code snippet. over here i think im not sure: private void button1_Click(object sender, System.EventArgs e) { Form2 frm = new Form2(); frm.textBox1.Text = "I got the value"; << the textBox1 is in my form2 so i get errors something like this --> textbox1 not found in this form (form1) and cant get access to textbox1 in form2. this.Hide(); frm.Show(); thanks friend once again! =)
-
parameterized queryi emailed u. not sure if u will be looking at my email. if u are, i've an access db attached to the email. please open table named Patient. feel free to ask me if you are unsure about anything. thank you really much!:-D
-
parameterized querysorry, i guess my information/description of problem is not clear so u are still not 100% clear about what im doing, is that so? i know u are more expert than me, while im just a beginner. but somehow, i suppose the above solution still will not solve my problem. would u mind if i send u some sample codes and run my codes to see what im actually doing? i've trouble explaining to u clearly as im not sure of those terms/acronyms.
-
parameterized queryhope to solve this problem today. thanks for your time and effort, friend. =) unfortunately, the codes didnt work. i did this in form1> oleDbDataAdapter1.SelectCommand.Parameters["ContactID"].Value = textBox1.Text; dataSet11.Clear(); oleDbDataAdapter1.Fill(dataSet11); dono.Form2 frm = new dono.Form2(); frm.textBox1.Text = dataSet11.Tables[0].Rows[0][""].ToString(); >>i think something's wrong here.. but i donno what is it.. this.Hide(); frm.Show(); just to tell u i used databinding to all my textboxes in form2.