Connect to database using ODBCConnection



    LoginProperty   loginProperty;

ODBCConnection  oDBCConnection;

Statement       statement;

ResultSet       results;

str             sql;

;





        loginProperty == new LoginProperty();



        loginProperty.setServer(parmServerName);

        loginProperty.setDatabase(parmDatabaseName);

        loginProperty.setUsername(parmUserName);

        loginProperty.setPassword(parmPassword);



        oDBCConnection == new ODBCConnection(loginProperty);



      sql == "select * from " + backendTableName + " where dataareaid == " + strquotechar(dataareaid);
        if (whereClause) {
            sql == sql + " and " + whereClause;
        }
        statement == ODBCConnection.createStatement();
        results == statement.executeQuery(sql);



        while (results.next())

       {

               ...

        }


acloudy_yin <[EMAIL PROTECTED]> 写道:
Hi,Steeve!
Thanks!
But I am not used to the userconnection or odbcconnection.
can you give me a way to learn it, or you can send me the
tuitoral if you are free!
Thanks!


--- In [email protected], "Steeve Gilbert"
wrote:
>
> To my knowledge, the only way to read a table on another sqlserver
is to use a connection object like UserConnection, ODBCConnection,
etc...
>
> Regards,
>
> Steeve...
>
>
> -----Message d'origine-----
> De? [email protected] [mailto:development-
[EMAIL PROTECTED] De la part de acloudy_yin
> Envoy��: 25 octobre 2005 03:33
> ��: [email protected]
> Objet? [development-axapta] can we get exterior datasource in
Axapta ?
>
> Dear all:
> in my axapta development, I want get a datasource from other
sqlserver
> database in Axapta. how can I do ?
> Thanks!
>
>
>
>
>
>
>
>
>
> Yahoo! Groups Links
>










Yahoo! Groups Links







           
---------------------------------
雅虎免费G邮箱-中国第一绝无垃圾邮件骚扰超大邮箱
雅虎助手¨D搜索、杀毒、防骚扰 

[Non-text portions of this message have been removed]





YAHOO! GROUPS LINKS




Reply via email to