how to insert data entered by the user through GUI in java to MS access.?
536894
Make an ODBC and then use the JDBC-ODBC Bridge to connect to Access and issue SQL Statements to insert records in your DB!
828970
dim db as database\ndim rs as recordset\ndim strSQL as string\ndim strA as string\ndim strB as string\ndim strC as string\n\nset db = currentDB\n\nstrSQL = "Select fieldA, fieldB, fieldC from Table1 where FieldD = fieldvalue"\n\nset rs = db.openrecordset(strSQL, dbOpenDynaSet)\n\nif not rs.EOF then\nstrA = rs!fieldA\nstrB = rs!fieldB\nstrC = rs!fieldC\n\nend if
969810
you will need to use ASP for dynamically creating your pages. you would setup a DSN (data source pointer) that links to your excel document using the JET driver probably. you would then be able to use ASP to query inside your excel sheet to populate your HTML form fields.\n\na better way forward would be to use a real database. you could start by importing your excel spreadsheet into Access. you would again setup a DSN/ODBC datasource to your MDB Access file, but inside ASP, you would then use ADO objects to use SQL to query your MDB for populating the fields.\n\nthere is plenty of info out there on this if you google.
880089
if you know 2003, you should have the answer to this.  You have to post the form back to the same page (add a button with a method like btnSubmit_Click(object sender, EventArgs e).  Once this the page is posted back, you then need to create a database connection.\n\nYour SQL connection string should be saved in your web.config file.\n\nusing System.Data.SqlClient;\n\nSqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["con"].ConnectionString);\nSqlCommand cmd = new SqlCommand("INSERT INTO TABLENAME (Column1, Column2, Column3) VALUES (" + "'" + txtColun1 + "'" + "," + "'" + txtColumn2 + "'" + "," + "'" + txtColumn3 + "'" + ")", con);\ntry\n{\n   cmd.ExecuteNonQuery();\n}\ncatch(SqlException e)\n{\n  string error = e.Message.ToString();\n}\nfinally\n{\n  con.close();\n}\n\nThe only change is that VS 2003 use to use:\nSqlConnection con = new SqlConnection(ConfigurationSettings.AppSettings["con"]);  This is now obsolete.\n\nSorry, I updated this because yahoo answers cut have my code off.
112245
Microsoft - Its called Access (Database)
896120
and also u have to give the all the fileds. \nint database there r 3 files, like Name, Age, Date, Table name is "details"\n\ninsert into details values ('Natarajan',23,'29-01-1983');\n\nthis is the correct way. don't mis any field...\n\nif u want to insert only some fileds.\n\ninsert into details(name,age) values('Natarajan',22);\n\nthats it...
421773
MS access will do that, \n\nlookfor help in excel for JET or OBDC
354180
go to Toolbox.Here u can see several options.\nData\nComponents\nWidows Forms\nCliboard Ring\nGeneral\n\nclick on Data.double click on Oledb Connection.Then it will see at the \nbottom of the page.select properties by rightclicking on the control.\nClick the dropdown arrow of the connectionstring property and click \n<New Connection...>.Then Data Link Properties page displayes.\nclick on the provider tab.Select Microsoft jet 4.0 OLEDB Provider.\nClick Next.Select ur database by clicking on the ellipse.Click on\nthe 'TEst connection' button to check ur connections.\nIf it displays the succeful message click ok.Then u will the connectionstring\njust copy the connectiostring\n\nform1.vb\n_________\nImports System.Data.OleDb\nwrite this code at the top of the form.just before the public Class Form1\n\nthen declare the connection object\nDim mycon As New OleDb.OleDbConnection\nmycon.Open()\nmycon.ConnectionString = "paste the connectionstring"\n\nInstead of writing this connectionstring u can use the Oledb control
1152714
1)create a temp table- with ten rows of data\n2) insert data into temporary table- insert into ....\n3) display / select  .....\n4) repeat  by using "for" or "while" command
902750
Are you using .NET?\nIf so, I've done it in C#.\nI don't expect there will be all too big of a difference between the two. Also, if you're doing this for a website, I'd highly recommend MySQL over Access. Acess will bomb out on you -- especially if there are multiple concurrent connections. Send me an email if you need more help on it.\n\nusing System.Data.OleDb; //This might be different in C++\n\npublic void ConnectToDatabase()\n{\n  OleDbConnection dbConn;\n  string strConnection;\n\n  strConnection = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=&#92;somepath&#92;mydb.mdb;User Id=admin;Password=;";\n/*go to www.connectionstrings.com for more info on connection strings*/\n\n  dbConn = new OleDbConnection(strConnection);\n  dbConn.Open();\n\n  //woot, the database is open!\n  OleDbCommand cmdCommand;\n\n  cmdCommand = new OleDbCommand();\n  cmdCommand.Connection = dbConn;\n  cmdCommand.CommandText = "SELECT * FROM tblItem";\n\n  OleDbDataReader rdReader;\n\n  rdReader = cmdCommand.ExecuteQuery();\n\n/*\nThe read function advances to the next row and returns true upon success\n*/\n  while(rdReader.Read())\n  {\n     //This command shows a pop-up of the string\n     //In Row #1 of the results (#0 is the first row)\n     MessageBox.Show(rdReader.GetString(1));\n  }\n\n  rdReader.Close(); //always close your reader or it gets mad\n  dbConn.Close();\n}
143941
1) Oracle has a program call SQL Loader that loads tables from external data.  You can write a module in Access to create a flat fiel from your data and put it in a form where SQL Loader understands.\n\n2) A solution that works with almost any RDBMS is to write a module in Access to create SQL Insert statement for each record in your Access table, and write them to a file.  Then, using the RDBMS's batch execution engine (SQL PLus for Oracle, OSQL for SQL Server, MySQL command prompt, etc, ISQL for Sybase, etc), simply create yout table and run those insert statements.\n\nAn example of 2) would be ...\n\nFunction doIt()\n\nDim rs As Recordset\n\nSet rs = CurrentDb.OpenRecordset("Select f1, f2 from t1;")\nOpen "c:&#92;statements.sql" For Output As #1\nWhile Not rs.EOF\n    Print #1, "Insert into T1 (F1, F2) values ('" & rs("f1") & "', '" & rs("f2") & ")';"\n    rs.MoveNext\nWend\nClose\nrs.Close\n\nEnd Function
780343
If you are in VBA in MS Access? Than you can cut the string and used the variable directly and then finish the string.\n\nstudTbl.Open "SELECT * FROM [studlst] where ([no]=" & i &")"
885958
This code is the minimal. Here it validates the user name and password are admin. In case both the values are admin it allows login. Else it returns an error message - error!\n\nThe only thing that may be confusing for you over here may be the session concept. \n\nThis code has no databse connectivity. Incase you are planning for a database based project use a MS Access connectivity. Its easy.\n\nLet me explain this code\n\n<% IF Request.form="" THEN %> \n<html> <body> In order to access this pages fill the form below:<BR> \n'THIS IS TO POST DATA FROM THE PAGE\n<form method="post" action="index.asp"> \nUsername: <input type="text" name="username" size="20"><BR> \nPassword: <input type="password" name="password" size="15"><BR> \n<input type="Submit" value="Submit"> \n</form> </body> </html> \n<% ELSE %> \n'IF USERNAME AND PASSWORD NOT admin RETURN an ERROR\n<% IF Request.form("username")="admi... AND Request.form("password")="admi... THEN %> \n<% Session("permission")="YES" \nSession("username")="admin" \n%> \n<html> <body> \n'THEN YOU CAN VIEW PAGE1 &  PAGE2\nHi <% =Session("username") %>, you can view: <BR> \n<A HREF="page1.asp">Page 1</A><BR> \n<A HREF="page2.asp">Page 2</A> \n</body> </html> \n<% ELSE %> Error! <% END IF %><% END IF %>\n\nYou can mail me to technoblitzs@yahoo.com incase you have any clarification or want to connect to  a database.
650047
What does "hit all of the control form fields and report the information back to SQL" mean? \n\nDo you mean, you want a button that will run a given stored procedure on the server, using parameters?\n\nDo you mean, you want to obtain the value of the form fields and use them to build a SQL statement that you then execute on the server?\n\nAlso, are you using SQL server, MySQL, SAP, whatever as a SQL database?\n\nUPDATE:\n\nYou still haven't told me what kind of DB server you are using, so I'll assume is SQL Server.\n\nYou don't need to create a VBA Script to do what you want. You can simply link the relevant SQL tables in your Access project file, then work with them as though they were tables in the Access DB itself.\n\nIn other words, you can build a form based on a linked table, just like you would build a form for a regular Access table; it will insert data for you into the linked table, the same way it would for a regular table.\n\nSee link below for more information.
492576
Can u elaborate the problem, The MS-Access has it own built in SQL building routine, if this is not solving your problem, then please explian the kind of connectivity or query u are passing so that i can understand it better..!
394506
Use the import data wizard in access. Make sure your Excel sheet has data in a contiguous range with a column label in the first row.
1074603
Off course, several ways..\n- Export your database into Excel file (xls or csv or ... ) and open it in Excel\n- In Excel go to Data > Import Externat data > new database query\n- Copy and paste\n\nRead my profile, I am the XLMan