Amir give the url my mail id is [email protected]
On 2/17/10, amir <[email protected]> wrote: > > I have worked on this. If any one needs code please send me a mail. > I'll give you the sample projects. > > Thanks & Regards > Amir K > Web Solution Developer. > > On Feb 12, 9:04 pm, KeidrickP <[email protected]> wrote: > > yep, > > that and you only need to select the columns that you need rather than > > everything from the table. Using * will leave you open to SQL injections. > > try w3schools.com or codeproject for a working example of what you are > > trying to accomplish. The MSDN library is not a bad option either > > > > On Fri, Feb 12, 2010 at 10:01 AM, Processor Devil < > [email protected] > > > > > > > > > wrote: > > > man, do you see that string saying "SELECT * FROM clients where > id='02'"? > > > Guess what, that SELECT is MySQL command... > > > INSERT command is to insert data into MySQL table... > > > I suggest you to search google for "MySQL INSERT". > > > > > 2010/2/12 stephan king <[email protected]> > > > > > yeah , I tried google ,found an exemple to get data from the DB , but > > >> Ididn't found how to insert data into the DB > > > > >> *my working example:* > > > > >> <%@ Page CompilerOptions='/R:"C:\Program > > >> Files\Microsoft.NET\Odbc.Net\Microsoft.data.odbc.dll"'%> > > >> <%@ Import Namespace="System.Data" %> > > >> <%@ Import Namespace="Microsoft.Data.Odbc" %> > > >> <HTML> > > >> <HEAD><title>Last one</title> > > >> <SCRIPT Language="VB" Runat="server"> > > >> Sub Page_Load(Source as object, e as EventArgs) > > >> Dim sConString As String = "DRIVER={MySQL ODBC 5.1 Driver}; > > >> SERVER=localhost; DATABASE=test; UID=root; PASSWORD=root; OPTION=3" > > >> Dim oConnection as ODBCConnection = new ODBCConnection(sConString) > > > > >> Dim sSQL as String = "SELECT * FROM clients where id='02'" > > >> Dim oDataAdapter as ODBCDataAdapter = New ODBCDataAdapter(sSQL, > > >> oConnection) > > >> Dim oDataSet as DataSet = new DataSet() > > >> oDataAdapter.Fill(oDataSet) > > >> oDataGrid.DataSource = oDataSet > > >> oDataGrid.DataBind() > > >> End Sub > > >> </SCRIPT > > > >> </HEAD> > > >> <BODY> > > >> <ASP:DataGrid ID="oDataGrid" Runat="server" /> > > >> <br /> <H2>ouff !! it works</H2> > > >> </BODY> > > >> </HTML> > > > > -- > > Keidrick Pettaway > > > > http://kpettaway.com >
