‘SQL Server’ Category Archives
by Lynn Demarest in ASP.NET, SQL Server, Technical, Web
Buy viagra in canada I was rolling along one night, buy viagra in canada tired but making good progress, buy viagra in canada when one of my DropDownLists refused to fire its OnSelectedIndexChanged event.
Buy viagra in canada After some time, buy viagra in canada I finally realized that the VALUES of the ill-behaving DropDownList were all the empty string (“”) because I had forgotten to make the key column of the table supplying the list data an IDENTITY column in SQL Server. Buy viagra in canada So even though the selected INDEX was changing, buy viagra in canada the selected VALUE was not. Buy viagra in canada It was always “”, buy viagra in canada because the keys were NULL in SQL Server.
Buy viagra in canada My point here is that had Microsoft named the event better — or fixed it so that it is fired when its name says it will be — the confusion could have been avoided.
Buy viagra in canada Be forewarned: The selected index in a DropDownList can change all it wants, buy viagra in canada but unless the underlying value changes the control’s SelectedIndexChanged event will not be fired.
Buy viagra in canada
by Lynn Demarest in SQL Server, Technical
Viagra prices UPDATE: I learned today that you can sometimes open .DBF files with Excel. Viagra prices If you can do this, viagra prices it will be easier than the method described below. Viagra prices Simply open the .DBF file, viagra prices then save it as a .CSV and import the .CSV into SQL Server.
Viagra prices I received a .DBF file the other day that contained a bunch of data in which I was interested. Viagra prices I don’t have DBase anymore (who does?) so I wanted to import the data into MS SQL Server so I could write queries against it. But how to accomplish such an import? There’s no option to import a .DBF file directly.
Viagra prices The solution was ODBC. Viagra prices Here’s how to do it:
1. Viagra prices Create an ODBC connection to the .DBF file
- Find Data Sources (ODBC) in the Control Panel‘s Administrative Tools.
- Select the System DSN tab and click Add
- Select Microsoft DBase Driver (*.dbf)
- Click Finish
- Enter a Data Source Name (no spaces)
- Un-check Use Current Directory
- Click the Select Directory button and navigate to the folder that contains the .DBF file
Viagra prices Your .DBF file is now ready to be accessed via ODBC.
2. Viagra prices Import the .DBF data into SQL Server
- Open Microsoft SQL Server Management Studio and create a new database
- Right-click the database name, viagra prices select tasks and import data.
- The welcome screen will open. Viagra prices Click Next.
- Select the data source
Because we’re moving data into SQL Server from .DBF, viagra prices the .DBF file is our source.
Select .Net Framework Data Provider for Odbc
- In the Dsn area, viagra prices enter the DSN (data source name) you just created.
- Enter ODBC for the Driver. Viagra prices (The ConnectionString should be created for you.)
- Choose the destination SQL Server. Viagra prices (This should already be the database you set in step 2, viagra prices above.)
- You will only be able to select Write a query to specify the data to transfer. Viagra prices Click Next.
- Your query is select * from [filename.dbf] where [filename.dbf] is the name of the file the ODBC connection points at. Viagra prices (Do NOT enter the brackets!)
- Change the name of the destination table so that it makes sense. Viagra prices It will default to “Query”
- Click Finish to execute the data transfer