srv = Sqlserver.connect(servername,userid,password);
Table List
container tablelist(srv)
SQLDMO._Database db;
Container tbllist;
for (idx=0;idx<srv.Databases.count;idx++)
{
if (srv.Databases.Item(idx,'dbo').Name==spec_db
{
db=srv.Databases.Item(idx,'dbo');
break;
}
}
for(int idx=0;idx<db.Tables.Count;idx++)
{
tbllist=conIns(TblList,idx,db.Tables.Item(idx,"dbo").Name);
}
return tbllist;
}

*ExecuteWithResults(* /Command ) Command = 'Select * from
AXDB.dbo.CustTable where accountnum=\''+'102001'+'\'';

/
Regards




[EMAIL PROTECTED] yazm?s,:
> Hi,
>
> i can test the connection using
>
> sqlserver = new COM("SQLDMO.SQLServer");
> if(sqlserver.connect(servername,userid,password))
>
> but, if i have more than one database in the server, how do i specify the
> database in the above statement. in the above statement, only servername,
> userid and password are given. i want to specify the database name also to
> force the system to test the connection only in the specified database.
>
>
> pls. provide the solution. Thank u.
>
> regs,
> Hema. S
>
>
>
>
>
>
>
> SPONSORED LINKS
> Computer part
> <http://groups.yahoo.com/gads?t=ms&k=Computer+part&w1=Computer+part&w2=Programming+languages&w3=Microsoft+axapta&w4=Support+exchange&c=4&s=90&.sig=yLpvcLTIDJ5FTkRJGsO11w>
>       Programming languages
> <http://groups.yahoo.com/gads?t=ms&k=Programming+languages&w1=Computer+part&w2=Programming+languages&w3=Microsoft+axapta&w4=Support+exchange&c=4&s=90&.sig=cuhEClK4dU4wapXFmKisbQ>
>       Microsoft axapta
> <http://groups.yahoo.com/gads?t=ms&k=Microsoft+axapta&w1=Computer+part&w2=Programming+languages&w3=Microsoft+axapta&w4=Support+exchange&c=4&s=90&.sig=yfeG_U6QaLfPOZZIud02Fg>
>
> Support exchange
> <http://groups.yahoo.com/gads?t=ms&k=Support+exchange&w1=Computer+part&w2=Programming+languages&w3=Microsoft+axapta&w4=Support+exchange&c=4&s=90&.sig=hy8yRGMzrmxdphyITTUeqA>
>
>
>
> ------------------------------------------------------------------------
> YAHOO! GROUPS LINKS
>
>     * Visit your group "development-axapta
>       <http://groups.yahoo.com/group/development-axapta>" on the web.
>     * To unsubscribe from this group, send an email to:
>       [EMAIL PROTECTED]
>       <mailto:[EMAIL PROTECTED]>
>     * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>       Service <http://docs.yahoo.com/info/terms/>.
>
>
> ------------------------------------------------------------------------
>





SPONSORED LINKS
Computer part Programming languages Microsoft axapta
Support exchange


YAHOO! GROUPS LINKS




Reply via email to