oh i see... i can do multiple row updates now...
to take this to a higher level, how do i update multiple rows for ALL of the tables in my Access database?

right now, i only can update multiple rows for a table... so i have no choice but to update tables one by one...

i use dataadapter to generate update commands. using dataadapter i can only select one table to write my SQL codes. how can i update all my tables at one go then??

hi

how do i update multiple rows? right now i can only update one row.
it works like this now:
user keys in customerIdNo and pwd1. a match in database will display pwd1 in textbox. textbox is databind to password field in access database. user can change the displayed pwd1 to pwd2 or to other pwd. when update button is pressed it updates the password field and changes pwd1 to what the user has changed.

BUT only a row is updated. i've a few rows where the password field values are pwd1. i want all pwd1 to be changed to the pwd that the user has changed to.

i use dataadapter and dataset. in dataadapter i wrote select* from table1 where customerIdNo=? and password=?

please help.
thank you!

hi

i need to use serial port to transfer data from RFID tag to a computer. i already have these functions but i donno how to call them.

please help me to call the functions so that i can use them to download data from RFID tag to computer (into Access db).

it's using string method to write the data from RFID to the computer.. how do i use varchar or some methods to read the data into Access db?

i already have a table created in db. now i just need to download the data into the table.

here are the serial port functions:

public class SerialPort
    {
        public int PortNum = 1; 
        public int BaudRate = 9600;
        public byte ByteSize = 8;
        public byte Parity = 0; // 0-4=no,odd,even,mark,space 
        public byte StopBits = 0; // 0,1,2 = 1, 1.5, 2 
        public int ReadTimeout = 1500;

        //comm port win32 file handle
        private int hComm = -1;

        public bool Opened = false;

        //win32 api constants
        private const uint GENERIC_READ = 0x80000000;
        private const uint GENERIC_WRITE = 0x40000000;
        private const int OPEN_EXISTING = 3;        
        private const int INVALID_HANDLE_VALUE = -1;

        [StructLayout(LayoutKind.Sequential)]
            public struct DCB 
        {
            //taken from c struct in platform sdk 
            public int DCBlength;           // sizeof(DCB) 
            public int BaudRate;            // current baud rate
            /* these are the c struct bit fields, bit twiddle flag to set
            public int fBinary;          // binary mode, no EOF check 
            public int fParity;          // enable parity checking 
            public int fOutxCtsFlow;      // CTS output flow control ...

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!

Hi

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 ...

hi

im not using c# 2005 Express. im using VS .NET 2003

thank you!

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! =)

hi

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! =)

i did this in my form1:
private void button1_Click(object sender, System.EventArgs e)
{
oleDbDataAdapter1.SelectCommand.Parameters["ContactID"].Value = textBox1.Text;
dataSet21.Clear(); >should i actually write this in form2?
oleDbDataAdapter1.Fill(dataSet21); >should i actually write this in form2 too?
}

im supposed to type what im looking for in textbox in form1. eg. look for information regarding the ID no. that is typed by user.
i want my form2 textbox controls to load with data from access db. how is that possible?

erm.. im not doing asp.. im doing windows form..
i want to let user type a criteria eg. ID no. in textbox and press Go button. this is to search for data that belongs to that ID no. only.
i want the data to be shown in a second form, not the same form as where the user types ID no.
how do i do that?

if i allow the data to be loaded in the same form as the textbox and button, i managed to retrieve the data i want.
but that is not my aim. i want data to be loaded on a different page.

please help me. this is urgent.
i appreciate your reply. thank you! =)

hi

how do i specify criterior using textbox and button in form1 and display results using textbox controls in form2?

thanks! =)

im a total newbie to c#, visual studio .net 2003 and even Access database 2000.. im doing my forms using visual studio and my data are all stored in access db..

i've some vague concepts abt how to design my app.. im not sure it'll work as i do not have enough knowledge yet, and i doubt i'll have enough time to research and come out with a solution on my own..
and so im here now, need some guidance, hopefully it's explained very simply to me as i really have some difficulty understanding those acronyms/terms for an app...

im doing this> a user keys in an ID no. in a textbox and then hits the enter key/Go button in a main form in visual studio, and the app will retrieve selected data (that ID no. user's data) out of Access tables and display that data in another form within Visual studio..

i hope to use wizards as far as possible due to simplicity and time constrain.. i understand that i cant get the wizards to meet all my criterias/expectations/aims so if need be, im ok to not use a wizard and build from scratch.. but that's where i get seriously stuck, i donno how to use visual studio TOGETHER with Access db.. i already read tutorials and help books but they are meant to teach a user to create forms and queries all WITHIN Access itself.. i wont be doing any forms within Access; im only doing forms in ...

hi

i got this error...

what should i do?

'System.Windows.Forms.KeyEventArgs' does not contain a definition for 'KeyChar'

thanks

please someone help me....

i just want to display my form which i had created using data form wizard INTO a tab page... my tap page is already done and working well... when i copy the form controls from the form created by wizard over to my tap page, and then i run it, the tab page with those controls that i've pasted over doesnt load with information from my database...

i've been debugging for a long time but i've no clue...

can someone tell me what's wrong or missing?? i've a time constrain....

i really appreaciate it if you can help me...

hi

im new to database and still figuring out how to use them... this is very urgent.. i want to retrieve a particular user's data from MS Access to my tab page of textboxes/radio buttons/combo boxes.. i want to allocate specific data in specific textboxes/radio buttons/combo boxes without using data form wizard.. i did databiding of controls to my table columns, but it's not showing when i run my app..

what should i do?

i appreciate it if you could provide me with specific details due to my time constrain..

thank you!

hi

im using MS access as my database... i've to receive data from another computer and store the data in my database... initially, both computers were using string for read and write... my computer would get the data and store them in a text file... but as the data will keep on increasing and it is a huge amount, as well as for better layout, my computer will now use database to store data instead of in a text file>notepad...

the codes used in the other computer is in string and i will NOT be changing the codes in that computer..

im not sure how a computer using string to read and write data will be able to pass data successfully to a computer using varchar for database.. i know i can use a wizard to convert data in text file to table form in database..
but what i want to do is to pass the data directly into a database from the other computer without having the user to need to use a wizard..
the user is supposed to click on a button in a form in my computer and the data will be retrieved from database for user to view/update...

my question is: how do i write/change my codes in MY computer in order for the data passed over to directly be stored in a database? (the data will not be kept in text file any more..)

thanks a lot!

hi

im using MS access database to keep my data and using visual studio .net 2003 to design forms...

i want to know how to retrieve data from access to my forms in visual studio .net.. what codes must i write in visual studio .net or must i use some access wizard to do what i want?

thanks!

hi

just to inform you that i've replied to your email already. take care! =)

hi

thanks for the informative reply... i learnt a few things i didnt know before... thanks =)

just want to ask what are master, model, msdn, tempdb... and so under which node (master, model, msdn or tempdb) do i go to to create table? when i right click on table i only get refresh and properties... i dont see any create table or new table options...
what's wrong and what's happening?

my experience and knowledge is very little regarding computer and IT stuff... it's my first attempt at c#, database and i hope what i need to do will use as little command prompt as possible... i need to know which is the easiest database to use, can store lots of data and can be used/accessed by many users though im not doing a web app... just something like an intranet...

btw what are the steps for doing a database? what i actually mean is, i've to choose a database, install it, connect to the database, create tables etc right? what are the exact steps to do it? i've a form done in visual studio .net 2003 already..

now i want to pass the data to database when the user chooses to update some particulars with the form... if some of the user's data is the same as before (so i've to create some "older" data too) for example his name and gender is the same, but address is different and he now has a phone number which he didnt ...

hi
i emailed again.. please check if you received already... thanks... and just give me a reply through email... thanks! =)

hi

i just like to check if this database can be connected to or accessed by many computers...or is it only one computer can be connected to the database?

please reply..

thanks! =)

hi i've sent the email to you but i think there's a failure notice... not sure if you received...
please reply..

Hi

Im using visual studio .net 2003 (not 2005) and I'm looking for a good database to work at and also helpful articles to help me, a newbie to c# and database, start creating a database and linking my forms' data from visual studio to the database.

1) If it is possible, how/where can I get templates or even completed database from people's app so that I can modify the codes and link to my program? Im sorry, but I've a time constrain now... I've been trying to do but failed as I could not understand the terms/meanings regarding databases...

2) What are the different database systems available that can be used with visual studio . net 2003 (yes, not 2005)?

3) What are the database systems available that provide a large data storage space and allow huge number of people to access/update the database at the same time?

4) I've downloaded microsoft sql 2005 server express. I've also spent the past few hours looking for step-to-step guide to start using and creating a database. However, up till now I still have no idea how to start using this sql server express. Any helpful links for newbies to start doing a database?

Im wondering, is visual studio .net 2003 compatible with microsoft sql 2005 server express? This is because I only see Deep Integration with Visual Studio 2005 titles/headings associated with microsoft sql 2005 server express.

PS: Anyone with similar experience regarding visual studio .net 2003 and has to create ...

hello

do you mind giving me your email add so that i can discuss with you about the project via emails?

no worries,
no virus will be sent to you :lol:

hi,

can anyone tell me what's wrong with my code or show me a working code to add in to my program so that i can study and understand how the code actually works..

after i type in textbox, i want to be able to hit "enter" key instead of clicking on the button.. i do not mean that i want to disable clicking on the button.. i just want to let user be able to hit "enter" too.. my textBox is named textBox4, button is button3 and after the button is hit, it should open a tab page called tabPage6 under tabControl1...

private void button3_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
{
if(e.KeyChar==(char)13)
{
this.GetNextControl(textBox4,true).Focus();
tabControl1.Focus();
tabControl1.SelectedTab=tabPage6;
e.Handled=true;
}
}

thanks!

hi

i've tried what u typed n it works! =)
but i have to set another condition that is if 12 DIGITS are entered, condition'll also be set to true..

1) i want to ask you what does Substring(0,1) mean in >>

if(input.Substring(0,1).ToLower() != "f" && 
input.Substring(0,1).ToLower() != "s")result = false; 

and why is there a (0,1)??

2) can you write me the comments for

for(int i = 1; i < input.Length -1; i++)
{
    if(!isNumber(input.Substring(i,1))) result = false;
}
if(!isLetter(input.Substring(input.Length-1,1))) result = false;

because i do not really understand what each line does to the program.

3) does the codes you wrote ensure that the order is followed? that means, is the user supposed to enter in this order only > a letter either s/f followed by any 7 numbers and end with any 1 letter from a-z ? i only want this order to be allowed..

thank you so much!
i was gladly surprised when you replied to my post.. i thought nobody knows how to code.. everyone asks me to use regular expression.. even though i know which kind of regular expression to use now, i still do not know where to insert the codes in my program and so i couldnt proceed.. thanks to you for your timely arrival.. as long as yours can help me, i will forsake regular expression.. luckily i know where to insert your codes, otherwise i donno what to do with my program.. =) thanks!

[QUOTE=tayspen]i cant belive that you have to have a .net framework on the computer to run the C# apps. because of this no my friends cant use them. there should be away around this does ne body know if there is?[/QUOTE]

sorry i dont think there's a way.. i think everyone needs .net framework to do that... im not so sure.. read some articles on .net framework.. u shd be able to find your ans there..

i would like to know how to make my app work the way i want it... at first my app is like this> a user types anything in a textbox and as long as it's a length of 9 or 12 it'll open a form..

here's a small part from my program:

private bool Validate(string Val)
{
if(Val!="")
{
if(Val.Length==9||Val.Length==12)
{
return true;
}
else
return false;
}
else
return false;
}

now i want to make sure that the user either keys in
i) length of 12 numbers eg. 123456123456
OR
ii) a letter that is either s/S/f/F + any 7 numbers + any 1 letter and in this order only eg. F1234567P
to be able to open the form.

here's something i got but donno how to go on from here: (and i donno if it's usable in my program)

input.Length == 9 && System.Text.RegularExpressions.Regex.Match(input, @"[sSfF]\d{7}\w").Success

pls help
thanks

i've to set some conditions to my program. user has to enter a string of 2 letters + 7 numbers in this order eg. x1234567y
how do i set the conditions to make sure the order is correct?

thanks

hi

thanks for all those replies.

i managed to solve the first question (to close a tab page after viewing) by adding a button to the tab page n writing the click event>> tabControl1.TabPages.Remove(tabPage1);

for the 2nd problem (not to allow user to open the same tab page when one is currently opened), i set conditions to >>

if (tabControl1.TabPages.Contains(tabPage1)) // Check if a tabpage is already opened
                {
                    // To cause no effect when button to open tab page is clicked after one tabpage is opened

                }