Showing posts with label facing. Show all posts
Showing posts with label facing. Show all posts

Friday, March 23, 2012

Import fail in oracle 8i Err- Imp00037

Hi all of the Dearest Friends,

very urgently required ........ if possible

I am facing one problem in oracle 8i. When i am trying to import the database it's giving the err- IMP-00037 Character set marker unknown

i want to import my tables successfully. Any one there could help me in my problem.

@. specs about actions In detail...

I am trying to import the Tables from one oracle server to another oracle server. The Server from which i exported Tables having the database name PRJDB1 and the The server in which i am going to import has the name PRJDATA1.

so the question is can this create any problem?

or any other ideas/steps/helping hands on this.

Thankx in Advance.

JTP
Software EngineerYou can get this error if u are importing between different versions of oracle i.e. export from an 8.1.7 db then trying to import to a 8.1.6 db.

Are the version of oracle you using the same?

Wednesday, March 7, 2012

import CSV data to SQL Server database

Hello everyone,

I need help with a situation that iam facing right now.

Here is the problem:

I have a tab limited or comma delimited CSV file. I want to read the contents of that CSV file and import it in one of the tables in the database.

id firstname lastname
-- ---- ----
"1" "John" "Smith"
"2" "Louis" "Garcia"

I assume that the columns in the CSV files and the table in the database match the datatype.

What would be a good approach to do it ? If anyone have a code that does the job, please post it.

Thank You.Do you have Enterprise Manager? If so goto the "import data" menu.|||Or Use a Bulk Insert statement

BULK INSERT dbo.TableName FROM '\\yourMachine\filename.csv'
WITH (DATAFILETYPE = 'char',
FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n',
FIRSTROW = 2 )|||Hi pkr,

I want to achieve this programatically using ASP.Net and VB.Net .....

Can you tell me any good resources on it please ?

Thank You.|||Hi John,

Do you have a code snippet in ASP.Net/VB.Net that shows how to use the bulk statement ??

Please help.

Thank You.|||Its just like any other SQL statement|||The Bulk insert statement is best kept to the confines of a Stored procedure and therefore you would make a call to the stored proc from your Data Access Layer within your asp.net application.

If your going to use a DTS package you can call this directly from the DAL and manage each step programmatically; if this is the path you want to take I have posted some c# code in the following post:

http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=697176

But i don't recommend it.

All the best, John|||thanks a lot John. it really helped me .

Sunday, February 19, 2012

Implicit conversion of datatype text to nvarchar is not allowed.

I am facing a problem while using SQL Server with VB application.

Implicit conversion from datatype text to nvarchar is not allowed.
Use the convert function to run this query.

When i see the trace file, i see one stored procedure called but no
lines of code get executed, and immediately after that the ROLLBACK
TRANSACTION occurs and the applications fails.

But to my surprise i am able to do the same thing on a different
machine using the same application and the same database on the same
server with the same user id.

Can anyone explain the reason of occurance of this problem.

I require this very urgently, so i will be oblized if anyone can come
up with a quick response.

Kind Regards,
Amit KumarAmit (kumar_amit@.delhi.tcs.co.in) writes:
> I am facing a problem while using SQL Server with VB application.
> Implicit conversion from datatype text to nvarchar is not allowed.
> Use the convert function to run this query.
> When i see the trace file, i see one stored procedure called but no
> lines of code get executed, and immediately after that the ROLLBACK
> TRANSACTION occurs and the applications fails.
> But to my surprise i am able to do the same thing on a different
> machine using the same application and the same database on the same
> server with the same user id.
> Can anyone explain the reason of occurance of this problem.

It seems that the procedure has a parameter of the type nvarchar, but
the application tries to pass a text parameter.

Is that really the same executable you run on the two machines. Or could
it be that they are two different versions, and the bug has been fixed in
one of them?

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Erland Sommarskog <sommar@.algonet.se> wrote in message news:<Xns9415F30B91F6DYazorman@.127.0.0.1>...
> Amit (kumar_amit@.delhi.tcs.co.in) writes:
> > I am facing a problem while using SQL Server with VB application.
> > Implicit conversion from datatype text to nvarchar is not allowed.
> > Use the convert function to run this query.
> > When i see the trace file, i see one stored procedure called but no
> > lines of code get executed, and immediately after that the ROLLBACK
> > TRANSACTION occurs and the applications fails.
> > But to my surprise i am able to do the same thing on a different
> > machine using the same application and the same database on the same
> > server with the same user id.
> > Can anyone explain the reason of occurance of this problem.
> It seems that the procedure has a parameter of the type nvarchar, but
> the application tries to pass a text parameter.
> Is that really the same executable you run on the two machines. Or could
> it be that they are two different versions, and the bug has been fixed in
> one of them?

No both the executables are exactly the same, and we are not passing
any text parameters via the application.

Also i found that there may be a problem due to some ODBC drivers not
able to adjust with the UNICODE datatypes. Because if the change the
datatype to non-Unicode then things work on fine. Now i want to know
what may the specific reason for the problems with non-unicode
datatypes...may be the windows NT or the ODBC drivers are the catch.
But i am not sure what and where to search for these.

Thanks,
Amit Kumar|||Amit (kumar_amit@.delhi.tcs.co.in) writes:
> Also i found that there may be a problem due to some ODBC drivers not
> able to adjust with the UNICODE datatypes. Because if the change the
> datatype to non-Unicode then things work on fine. Now i want to know
> what may the specific reason for the problems with non-unicode
> datatypes...may be the windows NT or the ODBC drivers are the catch.
> But i am not sure what and where to search for these.

Sounds like you should make sure that the machines have some good version
of the MDAC installed. Search around at www.microsoft.com. The MDAC
Component Checker can be a good thing to start with, although I've found
that it can get confused, if you have some newer version it does not
know about.

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Erland Sommarskog <sommar@.algonet.se> wrote in message news:<Xns9417425FAA96Yazorman@.127.0.0.1>...
> Amit (kumar_amit@.delhi.tcs.co.in) writes:
> > Also i found that there may be a problem due to some ODBC drivers not
> > able to adjust with the UNICODE datatypes. Because if the change the
> > datatype to non-Unicode then things work on fine. Now i want to know
> > what may the specific reason for the problems with non-unicode
> > datatypes...may be the windows NT or the ODBC drivers are the catch.
> > But i am not sure what and where to search for these.
> Sounds like you should make sure that the machines have some good version
> of the MDAC installed. Search around at www.microsoft.com. The MDAC
> Component Checker can be a good thing to start with, although I've found
> that it can get confused, if you have some newer version it does not
> know about.

I have already tried re-installation of the MDAC 2.5 but it did not
help me.
Can you give me idea if the regional settinngs could have created the
problem.
If yes, what must be the settings that creates this problem.

Also i found out that the Active Code Pages (ACP) also has an affect
and could be a reason for this problem. Do you have any idea of Active
Code Pages.

Thanks & Regards,
Amit|||Amit (kumar_amit@.delhi.tcs.co.in) writes:
> I have already tried re-installation of the MDAC 2.5 but it did not
> help me.
> Can you give me idea if the regional settinngs could have created the
> problem.
> If yes, what must be the settings that creates this problem.
> Also i found out that the Active Code Pages (ACP) also has an affect
> and could be a reason for this problem. Do you have any idea of Active
> Code Pages.

I thought ACP was for ANSI Code Page, but I could be wrong.

I don't really see where the regional settings would come in here, but
I've been wrong before.

Anyway, I have to admit that I am bit stumped. Is it possible for you
to share the source code that is causing the problem, both on the client
side and SQL Server side?

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp