Click here to Skip to main content
15,920,896 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Sqlserrver connection error Pin
NeverHeardOfMe7-Sep-08 3:54
NeverHeardOfMe7-Sep-08 3:54 
Questionshowing item of list in gridview row. Pin
strawberrysh7-Sep-08 2:53
strawberrysh7-Sep-08 2:53 
Question[Message Deleted] Pin
Nika Asgari7-Sep-08 0:46
Nika Asgari7-Sep-08 0:46 
AnswerRe: i have an so so so stupid question a bout form and div in my page Pin
NeverHeardOfMe7-Sep-08 2:20
NeverHeardOfMe7-Sep-08 2:20 
GeneralRe: i have an so so so stupid question a bout form and div in my page Pin
Nika Asgari7-Sep-08 2:36
Nika Asgari7-Sep-08 2:36 
GeneralRe: i have an so so so stupid question a bout form and div in my page Pin
Perspx7-Sep-08 2:57
Perspx7-Sep-08 2:57 
AnswerRe: [Message Deleted] Pin
Ravi Sant3-May-11 0:30
Ravi Sant3-May-11 0:30 
QuestionCVS TO SQL HELP !!! Pin
JACENZ7-Sep-08 0:21
JACENZ7-Sep-08 0:21 
Hey guys i'm just working on a project at the moyment and this database i got from one of my class which upload cvs file but i don't know the first thing about it . help please .

all the database i've seen for cvs file looks simple ie.

<b>1,John Mye,1980,ect....</b>

But mine is like this:

<b>"'Hislop, Creagh &amp; Main Legal papers', 1858-1930, 73-056, Alexander Turnbull Library, Wellington ","1858-1930 ","","Open","1 folder","","73-056 ","Alexander Turnbull Library, Wellington","62","Hislop, Creagh &amp; Main Legal papers ","Comprises legal papers, mostly letters of appointment","No"
"'Hislop, Creagh &amp; Main Legal papers', 1858-1930, 73-056, Alexander Turnbull Library, Wellington ","1858-1930 ","","Open","1 folder","","73-056 ","Alexander Turnbull Library, Wellington","1149","Hislop, Creagh &amp; </b>

Here is the databse ,

This is the error message i keep geting for it .
<pre>Msg 102, Level 15, State 1, Line 29
Incorrect syntax near 'varchar'.
Msg 208, Level 16, State 1, Line 1
Invalid object name 'DatabaseCSVFile.csv'</pre>

This is the code i've change some stuff on it already .

IF NOT EXISTS(SELECT * FROM sys.databases
          WHERE name = N'Redwood')
	CREATE DATABASE Redwood
GO
USE Redwood
--
-- Alter the path so the script can find the CSV files
--
DECLARE
   @data_path nvarchar(256);
SELECT @data_path = 'C:\Documents and Settings\Administrator\Desktop\Redwood\';
--
--GO
-- =======================================
-- Delete existing tables
--
IF EXISTS(
  SELECT *
  FROM sys.tables
  WHERE name = N'DatabaseCSVFile'
         )
  DROP TABLE DatabaseCSVFile;
--
-- Create tables
--
CREATE TABLE DatabaseCSVFile
     (	Citation				varchar(8000) NULL,
    Date					varchar(200) NULL,
    Digital					nchar (3)NULL,
	File_Classification		varchar(200) NULL,
	Notes					varchar(8000) NULL,
	Place_of_Origin			varchar(8000) NULL,
	Reference Number		varchar(100) NULL,
	Repository				varchar(8000) NULL,
	Source Number			int(6) NULL,
	Source Title			varchar(8000) NULL,
	Summary_of_Contents		varchar(8000) NULL,
	Viewed					varchar(8000 NULL), 
     );

--
-- Load table data
--
--
EXECUTE (N'BULK INSERT LicenseStatus FROM ''' + @data_path + N'DatabaseCSVFile.csv''
WITH (
    CODEPAGE=''ACP'',
    DATAFILETYPE = ''char'',
    FIELDTERMINATOR= '','',
    ROWTERMINATOR = ''\n'',
    KEEPIDENTITY,
    TABLOCK
);');
-- ================================================

--
GO
SELECT *,              COUNT(*)  
FROM DatabaseCSVFile.csv

GO

AnswerRe: CVS TO SQL HELP !!! Pin
Wendelius7-Sep-08 10:05
mentorWendelius7-Sep-08 10:05 
QuestionHow to Check the internal file content to upload only PDF files using upload control. Pin
VB 8.07-Sep-08 0:21
VB 8.07-Sep-08 0:21 
Questionrun time event create Pin
Bhim Prakash Singh6-Sep-08 22:31
Bhim Prakash Singh6-Sep-08 22:31 
AnswerRe: run time event create Pin
Perspx6-Sep-08 22:44
Perspx6-Sep-08 22:44 
AnswerRe: run time event create Pin
Guffa6-Sep-08 23:04
Guffa6-Sep-08 23:04 
Questionget the printer of client machine Pin
RuviniPerera6-Sep-08 19:16
RuviniPerera6-Sep-08 19:16 
AnswerRe: get the printer of client machine Pin
Guffa6-Sep-08 23:14
Guffa6-Sep-08 23:14 
Questionfinding control inside usercotrl from javascript Pin
justintimberlake6-Sep-08 17:40
justintimberlake6-Sep-08 17:40 
AnswerRe: finding control inside usercotrl from javascript Pin
Ravi Sant3-May-11 0:32
Ravi Sant3-May-11 0:32 
Questionhow authenicate against a SQL server user store Pin
skyair6-Sep-08 9:57
skyair6-Sep-08 9:57 
AnswerRe: how authenicate against a SQL server user store Pin
Ravi Sant3-May-11 0:34
Ravi Sant3-May-11 0:34 
Question[Message Deleted] Pin
Omar Gameel Salem6-Sep-08 9:20
professionalOmar Gameel Salem6-Sep-08 9:20 
AnswerRe: changing masterpage at runtime Pin
Blue_Boy6-Sep-08 11:45
Blue_Boy6-Sep-08 11:45 
GeneralRe: changing masterpage at runtime Pin
Omar Gameel Salem6-Sep-08 15:43
professionalOmar Gameel Salem6-Sep-08 15:43 
AnswerRe: [Message Deleted] Pin
Ravi Sant3-May-11 0:38
Ravi Sant3-May-11 0:38 
Questionhow can I reach to values(text) of to column in gridview with pressing the button of that row? Pin
strawberrysh6-Sep-08 4:52
strawberrysh6-Sep-08 4:52 
AnswerRe: how can I reach to values(text) of to column in gridview with pressing the button of that row? Pin
balaji.t8-Sep-08 18:53
balaji.t8-Sep-08 18:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.