Thanks it works fine ... is it possible to put the data into an
array ? I think it would be easier for mee because otherwise ill have
to have some very defined SQL statements.
I get a form of list ( Because i selected 2 rows in the database )
and as far as i can se it's not possible to those one of them like
this getstring(1,1) ?
--- In [EMAIL PROTECTED], <[EMAIL PROTECTED]>
wrote:
> HI
>
> try this
> static void SQLStmt_Demo(Args _args)
> {
> Connection Connection;
> Statement Statement;
> ResultSet ResultSet;
> str myString;
> ;
> // Create a new connection to the Axapta database
> connection = new Connection();
> // Create a statement for the new connection
> Statement = connection.createStatement();
> // Execute a select statement in the new connection
> Resultset = statement.executeQuery("select AccountNum from
vendtable");
> // retrive a string from the first collumn in the resultset
> while (ResultSet.next())
> info(ResultSet.getString(1));
>
> }
>
> /Jesper
>
> -------- Original Message --------
> Subject: [development-axapta] Re: return sqlstatement to user (15-
Nov-2004 12:54)
> From: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
>
> >
> >
> >
> > I can't find the getstring command i can only find one called
tostring
> >
> > I can't figure out how to use that one when i use it something
like
> > this
> >
> > S.executeQuery( select ....... );
> > S.toString()
> >
> > If i get axapta to print the s.toString it only says: Class
Statement
> >
> > Could u give a exampel of how to do it ?
> >
> > --- In [EMAIL PROTECTED],
<[EMAIL PROTECTED]>
> > wrote:
> > > You get a resultset(Class) from a statement.
> > >
> > > You extract a string with the method getstring.
> > >
> > > /Jesper
> > >
> > > -------- Original Message --------
> > > Subject: [development-axapta] return sqlstatement to user (12-
Nov-
> > 2004 13:33)
> > > From: [EMAIL PROTECTED]
> > > To: [EMAIL PROTECTED]
> > >
> > > >
> > > >
> > > >
> > > > Im using the command S.executeQuery("Here should the SQL
> > statement
> > > > be");
> > > >
> > > > is it possible to return the value from the statement fx. a
> > select
> > > > statement to a string ?
> > > >
> > > > something like this:
> > > >
> > > > str RV;
> > > >
> > > > RV = S.executeQuery("Here should the SQL statement be");
> > > >
> > > > If i write this i get the error message "Operand types are
not
> > > > compatible with the operator"
> > > >
> > > > I suppose it's necessary to do some data conversion ?
> > > >
> > > > thank you in advance
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Yahoo! Groups Links
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > To: [EMAIL PROTECTED]
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
> > To: [EMAIL PROTECTED]
Yahoo! Groups Sponsor | |
|
|
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.