It is most likely because you are connecting as SA (which I suspect
you are not going to do in production, anyway).

Try creating a user, and set that users default database to "MyDatabase".

Larry


On 11/25/05, Broderick, Kevin <[EMAIL PROTECTED]> wrote:
>
>
>
> Hi,
>
> Thanks for the feedback. I'm using JNDI, I have a data source xml config
> file in JBoss defined like this:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
>         <datasources>
>
>                <local-tx-datasource>
>
>                        <jndi-name>MSSQLDS</jndi-name>
>
>
> <connection-url>jdbc:sqlserver://myMachine:1433;DatabaseName=MyDatabase</connection-url>
>
>
> <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
>
>                        <user-name>sa</user-name>
>
>                        <password>sa</password>
>
>                </local-tx-datasource>
>
>         </datasources>
>
>
>
> I am referencing it from my sql-Map config like this:
>
> <transactionManager type="JDBC" >
>
>                <dataSource type="JNDI">
>
>                        <property name="DataSource" value="java:/MSSQLDS"/>
>
>                </dataSource>
>
>         </transactionManager>
>
>
>
> As far as I was aware, I could comment out the SIMPLE datasource type and
> use my JNDI datasource?
>
>
>
> Thanks,
>
> Kevin
>
>
>
>  ________________________________
>
>
> From: Sheshadri Patel [mailto:[EMAIL PROTECTED]
>  Sent: 25 November 2005 09:26
>  To: Broderick, Kevin
>  Subject: Re: SQL Server requiring DB name prefix in sqlmap
>
>
>
>
> Hi,
>
>
>
>
>
> Configure DbConfig.xml using
>
>
>
>
>
> <transactionManager type="JDBC">
>
> <dataSource type="SIMPLE">
>
> <property name="JDBC.Driver" value="${driver}"/>
>
> <property name="JDBC.ConnectionURL" value="${url}"/>
>
> <property name="JDBC.Username" value="${username}"/>
>
> <property name="JDBC.Password" value="${password}"/>
>
> </dataSource>
>
> </transactionManager>
>
> and confiure the properties file in the same.
>
>
>
> Tx,
>
>
>
> Spatel.
>
>
>
>
>
> On 11/25/05, Broderick, Kevin <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> I've used iBATIS with Oracle and never came across this. I'm using SQL
> Server 8.0.760 with the 2005 JDBC driver.
>
> It seems to require me to add [DBNAME].[dbo] before each of the table names
> in the SQL map. Is this a known issue or is there a workaround? Any info
> greatly apprecicated.
>
> Thanks
>
> Kevin Broderick
>
>

Reply via email to