Monday, March 26, 2012
How can I change a local connectionstring??
this is my connectionstring:
mySqlConnection.ConnectionString = "Data
Source=.\SQLEXPRESS;AttachDbFilename='C:\Documents and Settings\me\Mis
documentos\Visual Studio
2005\Projects\Conferencia\Conferencia\dbConferencia.mdf';Integrated
Security=True;User Instance=True;"
and the problems comes when I publish the project, because it is not
possible to access to the database which path is in my local computer.
how can I change 'C:\Documents and Settings\me\Mis documentos\Visual
Studio 2005\Projects\Conferencia\Conferencia\dbConferencia.mdf' for
something like .\dbConferencia.mdf?
I've tried a few different ways, but i didn't get it :(
Thanks
davidTry putting the mdf in a App_Dat folder in your project/site
and change the connection string from C:Documnet ...
to App_Data\dbConferencia.mdf'
--
Paul Zanbaka
www.mycodekb.com
"dsoto@.plus-supermercados.es" wrote:
> Hi,
> this is my connectionstring:
> mySqlConnection.ConnectionString = "Data
> Source=.\SQLEXPRESS;AttachDbFilename='C:\Documents and Settings\me\Mis
> documentos\Visual Studio
> 2005\Projects\Conferencia\Conferencia\dbConferencia.mdf';Integrated
> Security=True;User Instance=True;"
> and the problems comes when I publish the project, because it is not
> possible to access to the database which path is in my local computer.
> how can I change 'C:\Documents and Settings\me\Mis documentos\Visual
> Studio 2005\Projects\Conferencia\Conferencia\dbConferencia.mdf' for
> something like .\dbConferencia.mdf?
> I've tried a few different ways, but i didn't get it :(
> Thanks
> david
>
Wednesday, March 21, 2012
How can I append only new rows in a table using SSIS?
Hi,
Im creatting an SSIS project that uses an Data Flow OLE DB Source to read data from an SQL Table and import it into a Destination table using Data Flow OLE DB Destination. but now everytime I run the project it appends all the rows not the new data rows only. How can I make the application so that it appends only the new data from a source table to a destination table. Is there maybe another Data Flow Control that can copy source table to destination and the next time it runs it only copy new rows. or any other way to do this using SSIS.
Your assistance will be highly appreciated.
Use the Lookup component. Set it up to return the keys of the destination table. Map the keys to your input data. Then grab the red arrow coming out of the lookup and hook it up to your destination.|||Hi Phil,
Im new to SSIS, please bear with me. I have maped the lookup component to the destination table and hook the redline out of the lookup to destination OLE DB Destination which is also mapped to a destination table. It coppies all the rows.
Please email me the sample project, my email is sibu.khanyile@.enerserv.co.za
Thank you in advance
|||Make sure that you use a derived column to TRIM() the key fields going into the lookup component. Also know that the keys must have the same CaSE as those in the destination table in order to match.Monday, March 19, 2012
How can Data Flow destination be a temp table?
I have a series of data flow tasks that I want to output to a temp table. I've set the data source for RetainSameConnection and the Data Flows are DelayValidation. The OLE DB data source inside the Data Flow works fine, but the data destinations don't offer a # or ## as a target. I've tried every destination that sounds logical, without success.
Any pointers? ... Thanks!
I do not get # tables, but that is because the UI cannot be the same connection that created them, so makes sense. Entering the table by hand, using the property grid directly would probably still work for # tables. ## tables get listed in the UI though as expected
Have you selected a connection pointing at your tempdb?
|||Hi Darren - thanks for responding.
I do use the same connection, and it does persist. I can select from the #temp or ##temp table using a SQL Task.
First, I create either a local temp table (let's call it #temp_local) or global (##temp_global) using an Exec SQL Command. The next task is a Data Flow, with a Source OLE DB being a SQL Query from a different connection than the temp table, and the OLE DB Destination is supposed to be the #temp_table or ##temp_table I just created. However, the dialog box for selecting the tables does NOT include ANY temp tables.
|||Run a profiler trace, and verify the call to list the tables, and check things like the DatabaseID, is it tempdb? It sounds like you have tripped up somewhere. Wrong server? Wrong database? As I explained above I cannot reporduce this behaviour.|||Looks like I found the answer, thanks to MCS consultant Brian Jackson. Check out http://msdn2.microsoft.com/en-us/library/bb332055.aspx for information on metadata. Evidently GetTableData inconsistently returns temp table meta data, whether it's a global or temp table.
I did find that you can enter the ##temp table name directly into the property box, but not by using the Edit box. And doing that works, kind of, after faking out the column matching dialog on the destination Editor by running it in-stream in debug, after pausing for a breakpoint. That way, the data flow sees the temp table. And the DelayValidation setting retains the pattern matching.
Even so, you're better off building an Expression query and using in-memory transforms, because the inconsistent return of meta data means you end up with data flows that fail for no apparent reason, or consistent error message. Debugging was driving me mad! :-)
Another case of "it's better to re-write, than to reuse" your code sometimes.
Friday, February 24, 2012
Hotfix contents
Does anyone know a source for the contents of the SQL Hotfix which updates SQL2000 to version 8.00.919? I have the hotfix and ran it on a development SQL server but I cannot find a definitive list of the contents. I've been given one article from microsof
t (http://support.microsoft.com/default...b;en-us;837957) but I believe there are more fixes contained therein (I'd hope so at >17mb). I couldn't find anything on knowledge base or technet.
Thanks
DaveK
http://www.sqlporn.co.uk
If you look at the list of files in 837957, I can certainly see that the
updated files add up to at least 17mb uncompressed.
Keep in mind that a certain patch level does not contain just that patch,
but it is cumulative (so that if you thought you needed to apply 918, for
example, you wouldn't have to because it's already there). I keep a list of
the hotfixes at http://www.aspfaq.com/2160 so you can browse through those
other KBs to see what other symptoms were fixed between build 760 and build
919.
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"DaveK" <anonymous@.discussions.microsoft.com> wrote in message
news:5BD0BDC4-A4D1-422B-9785-1BF224E167EF@.microsoft.com...
> Hi,
> Does anyone know a source for the contents of the SQL Hotfix which updates
SQL2000 to version 8.00.919? I have the hotfix and ran it on a development
SQL server but I cannot find a definitive list of the contents. I've been
given one article from microsoft
(http://support.microsoft.com/default...b;en-us;837957) but I
believe there are more fixes contained therein (I'd hope so at >17mb). I
couldn't find anything on knowledge base or technet.
> Thanks
> DaveK
> http://www.sqlporn.co.uk
Hotfix contents
Does anyone know a source for the contents of the SQL Hotfix which updates SQL2000 to version 8.00.919? I have the hotfix and ran it on a development SQL server but I cannot find a definitive list of the contents. I've been given one article from microsoft (http://support.microsoft.com/default.aspx?scid=kb;en-us;837957) but I believe there are more fixes contained therein (I'd hope so at >17mb). I couldn't find anything on knowledge base or technet
Thank
Dave
http://www.sqlporn.co.ukIf you look at the list of files in 837957, I can certainly see that the
updated files add up to at least 17mb uncompressed.
Keep in mind that a certain patch level does not contain just that patch,
but it is cumulative (so that if you thought you needed to apply 918, for
example, you wouldn't have to because it's already there). I keep a list of
the hotfixes at http://www.aspfaq.com/2160 so you can browse through those
other KBs to see what other symptoms were fixed between build 760 and build
919.
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"DaveK" <anonymous@.discussions.microsoft.com> wrote in message
news:5BD0BDC4-A4D1-422B-9785-1BF224E167EF@.microsoft.com...
> Hi,
> Does anyone know a source for the contents of the SQL Hotfix which updates
SQL2000 to version 8.00.919? I have the hotfix and ran it on a development
SQL server but I cannot find a definitive list of the contents. I've been
given one article from microsoft
(http://support.microsoft.com/default.aspx?scid=kb;en-us;837957) but I
believe there are more fixes contained therein (I'd hope so at >17mb). I
couldn't find anything on knowledge base or technet.
> Thanks
> DaveK
> http://www.sqlporn.co.uk
Hotfix contents
Does anyone know a source for the contents of the SQL Hotfix which updates S
QL2000 to version 8.00.919? I have the hotfix and ran it on a development SQ
L server but I cannot find a definitive list of the contents. I've been give
n one article from microsof
t (http://support.microsoft.com/defaul...kb;en-us;837957) but I bel
ieve there are more fixes contained therein (I'd hope so at >17mb). I couldn
't find anything on knowledge base or technet.
Thanks
DaveK
http://www.sqlporn.co.ukIf you look at the list of files in 837957, I can certainly see that the
updated files add up to at least 17mb uncompressed.
Keep in mind that a certain patch level does not contain just that patch,
but it is cumulative (so that if you thought you needed to apply 918, for
example, you wouldn't have to because it's already there). I keep a list of
the hotfixes at http://www.aspfaq.com/2160 so you can browse through those
other KBs to see what other symptoms were fixed between build 760 and build
919.
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"DaveK" <anonymous@.discussions.microsoft.com> wrote in message
news:5BD0BDC4-A4D1-422B-9785-1BF224E167EF@.microsoft.com...
> Hi,
> Does anyone know a source for the contents of the SQL Hotfix which updates
SQL2000 to version 8.00.919? I have the hotfix and ran it on a development
SQL server but I cannot find a definitive list of the contents. I've been
given one article from microsoft
(http://support.microsoft.com/defaul...kb;en-us;837957) but I
believe there are more fixes contained therein (I'd hope so at >17mb). I
couldn't find anything on knowledge base or technet.
> Thanks
> DaveK
> http://www.sqlporn.co.uk