|
 |
asp_web_howto thread: CONVERT function
Message #1 by "Franco" <francO.perretta@c...> on Wed, 20 Dec 2000 13:54:22 -0000
|
|
Dears,
this query give me the following error, all variables are "CHAR", why I
have to convert? In addition, wich should be the "CONVERT" sintax?
I will appreciate your help, a simple thing drive me creazy
Franco
----------------------------------------------------
qd = "INSERT INTO Test (Uno,Due) VALUES ("& TempMatricule & "," &
TempDateSheet & ")"
Set Rs=MyConn.Execute(qd)
Microsoft OLE DB Provider for SQL Server error '80040e07'
Disallowed implicit conversion from datatype 'varchar' to datatype 'int'
Table: 'dct_manage.dbo.Test', Column: 'Uno' Use the CONVERT function to
run this query.
---------------------------------------------------------
---
MaximumASP offers enhanced hosting solutions on the Windows 2000 platform. Dedicated processor, RAM, and server resources provide
dedicated server performance at virtual server prices. Commercial components provided; custom components allowed.
---
You are currently subscribed to asp_web_howto as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-asp_web_howto-$subst('Recip.MemberIDChar')@p2p.wrox.com
Message #2 by Gregory_Griffiths@c... on Wed, 20 Dec 2000 14:56:35 +0000
|
|
Firstly, check that your database is configured as you state. Secondly
try :
"INSERT INTO Test (Uno,Due) VALUES ('"& TempMatricule & "','" &
TempDateSheet & "')"
> -----Original Message-----
> From: francO.perretta@c... [mailto:francO.perretta@c...]
> Sent: 20 December 2000 13:54
> To: asp_web_howto@p...; francO.perretta@c...
> Subject: [asp_web_howto] CONVERT function
>
>
> Dears,
> this query give me the following error, all variables are
> "CHAR", why I
> have to convert? In addition, wich should be the "CONVERT" sintax?
> I will appreciate your help, a simple thing drive me creazy
> Franco
>
> ----------------------------------------------------
> qd = "INSERT INTO Test (Uno,Due) VALUES ("& TempMatricule & "," &
> TempDateSheet & ")"
> Set Rs=MyConn.Execute(qd)
>
> Microsoft OLE DB Provider for SQL Server error '80040e07'
>
> Disallowed implicit conversion from datatype 'varchar' to
> datatype 'int'
> Table: 'dct_manage.dbo.Test', Column: 'Uno' Use the CONVERT
> function to
> run this query.
> ---------------------------------------------------------
>
---
MaximumASP offers enhanced hosting solutions on the Windows 2000 platform. Dedicated processor, RAM, and server resources provide
dedicated server performance at virtual server prices. Commercial components provided; custom components allowed.
---
You are currently subscribed to asp_web_howto as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-asp_web_howto-$subst('Recip.MemberIDChar')@p2p.wrox.com
Message #3 by "Unterste, Andreas" <unterste@d...> on Wed, 20 Dec 2000 08:23:33 -0600
|
|
if your field datatypes are char, use :
qd = "INSERT INTO Test (Uno,Due) VALUES ('"& TempMatricule & "','" &
TempDateSheet & "')"
(notice the 's) otherwise sql tries to read numerical data.
cheers,
Andreas
-----Original Message-----
From: Franco [mailto:francO.perretta@c...]
Sent: Wednesday, December 20, 2000 14:54
To: ASP Web HowTo
Subject: [asp_web_howto] CONVERT function
Dears,
this query give me the following error, all variables are "CHAR", why I
have to convert? In addition, wich should be the "CONVERT" sintax?
I will appreciate your help, a simple thing drive me creazy
Franco
----------------------------------------------------
qd = "INSERT INTO Test (Uno,Due) VALUES ("& TempMatricule & "," &
TempDateSheet & ")"
Set Rs=MyConn.Execute(qd)
Microsoft OLE DB Provider for SQL Server error '80040e07'
Disallowed implicit conversion from datatype 'varchar' to datatype 'int'
Table: 'dct_manage.dbo.Test', Column: 'Uno' Use the CONVERT function to
run this query.
---------------------------------------------------------
---
---
MaximumASP offers enhanced hosting solutions on the Windows 2000 platform. Dedicated processor, RAM, and server resources provide
dedicated server performance at virtual server prices. Commercial components provided; custom components allowed.
---
You are currently subscribed to asp_web_howto as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-asp_web_howto-$subst('Recip.MemberIDChar')@p2p.wrox.com
Message #4 by "Paul, Michael" <mpaul@8...> on Wed, 20 Dec 2000 10:03:07 -0500
|
|
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C06A95.F653C750
Content-Type: text/plain;
charset="iso-8859-1"
Your variable values need to be is quotes like this.
qd = "INSERT INTO Test (Uno,Due) VALUES ('"& TempMatricule & "','" &
TempDateSheet & "')"
Set Rs=MyConn.Execute(qd)
-----Original Message-----
From: Franco [mailto:francO.perretta@c...]
Sent: Wednesday, December 20, 2000 8:54 AM
To: ASP Web HowTo
Subject: [asp_web_howto] CONVERT function
Dears,
this query give me the following error, all variables are "CHAR", why I
have to convert? In addition, wich should be the "CONVERT" sintax?
I will appreciate your help, a simple thing drive me creazy
Franco
--
---
MaximumASP offers enhanced hosting solutions on the Windows 2000 platform. Dedicated processor, RAM, and server resources provide
dedicated server performance at virtual server prices. Commercial components provided; custom components allowed.
---
You are currently subscribed to asp_web_howto as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-asp_web_howto-$subst('Recip.MemberIDChar')@p2p.wrox.com
Message #5 by PERRETTA Franco <Franco.PERRETTA@c...> on Wed, 20 Dec 2000 16:55:59 +0100
|
|
I'm really glad to you, it is working.
Franco
___________________________________
Perretta Franco
Council of Europe
Department of Information Technology
Information Access Unit
67075 Strasbourg Cedex
tel: +33 (0)3 88 41 22 18 fax: +33 (0)3 88 41 27 39
mailto:franco.perretta@c...
http://www.coe.int
-----Original Message-----
From: Gregory_Griffiths@c... [mailto:Gregory_Griffiths@c...]
Sent: Wednesday 20 December 2000 15:57
To: ASP Web HowTo
Subject: [asp_web_howto] RE: CONVERT function
Firstly, check that your database is configured as you state. Secondly
try :
"INSERT INTO Test (Uno,Due) VALUES ('"& TempMatricule & "','" &
TempDateSheet & "')"
> -----Original Message-----
> From: francO.perretta@c... [mailto:francO.perretta@c...]
> Sent: 20 December 2000 13:54
> To: asp_web_howto@p...; francO.perretta@c...
> Subject: [asp_web_howto] CONVERT function
>
>
> Dears,
> this query give me the following error, all variables are
> "CHAR", why I
> have to convert? In addition, wich should be the "CONVERT" sintax?
> I will appreciate your help, a simple thing drive me creazy
> Franco
>
> ----------------------------------------------------
> qd = "INSERT INTO Test (Uno,Due) VALUES ("& TempMatricule & "," &
> TempDateSheet & ")"
> Set Rs=MyConn.Execute(qd)
>
> Microsoft OLE DB Provider for SQL Server error '80040e07'
>
> Disallowed implicit conversion from datatype 'varchar' to
> datatype 'int'
> Table: 'dct_manage.dbo.Test', Column: 'Uno' Use the CONVERT
> function to
> run this query.
> ---------------------------------------------------------
>
---
MaximumASP offers enhanced hosting solutions on the Windows 2000 platform. Dedicated processor, RAM, and server resources provide
dedicated server performance at virtual server prices. Commercial components provided; custom components allowed.
---
You are currently subscribed to asp_web_howto as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-asp_web_howto-$subst('Recip.MemberIDChar')@p2p.wrox.com
Message #6 by Rajiv Gupta <rajivgupta@i...> on Thu, 21 Dec 2000 10:01:35 +0500
|
|
hi..
the query shud be:
qd = "INSERT INTO Test (Uno,Due) VALUES ('"& TempMatricule & "','" &
TempDateSheet & "')"
Set Rs=MyConn.Execute(qd)
At 01:54 PM 12/20/00 -0000, you wrote:
>Dears,
> this query give me the following error, all variables are "CHAR", why I
>have to convert? In addition, wich should be the "CONVERT" sintax?
>I will appreciate your help, a simple thing drive me creazy
> Franco
>
>----------------------------------------------------
>qd = "INSERT INTO Test (Uno,Due) VALUES ("& TempMatricule & "," &
>TempDateSheet & ")"
> Set Rs=MyConn.Execute(qd)
>
>Microsoft OLE DB Provider for SQL Server error '80040e07'
>
>Disallowed implicit conversion from datatype 'varchar' to datatype 'int'
>Table: 'dct_manage.dbo.Test', Column: 'Uno' Use the CONVERT function to
>run this query.
>---------------------------------------------------------
>
>---
---
MaximumASP offers enhanced hosting solutions on the Windows 2000 platform. Dedicated processor, RAM, and server resources provide
dedicated server performance at virtual server prices. Commercial components provided; custom components allowed.
---
You are currently subscribed to asp_web_howto as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-asp_web_howto-$subst('Recip.MemberIDChar')@p2p.wrox.com
Message #7 by "Harsh Nandu" <harsh_stgil@h...> on Fri, 22 Dec 2000 11:52:42 -0000
|
|
use this
qd = "INSERT INTO Test (Uno,Due) VALUES (' "& TempMatricule & "','" &
TempDateSheet & "')"
>From: "Franco" Reply-To: "ASP Web HowTo" To: "ASP Web HowTo" Subject:
>[asp_web_howto] CONVERT function Date: Wed, 20 Dec 2000 13:54:22 -0000
>
>Dears, this query give me the following error, all variables are "CHAR",
>why I have to convert? In addition, wich should be the "CONVERT" sintax? I
>will appreciate your help, a simple thing drive me creazy Franco
>
>---------------------------------------------------- qd = "INSERT INTO Test
>(Uno,Due) VALUES ("& TempMatricule & "," & TempDateSheet & ")" Set
>Rs=MyConn.Execute(qd)
>
>Microsoft OLE DB Provider for SQL Server error '80040e07'
>
>Disallowed implicit conversion from datatype 'varchar' to datatype 'int'
>Table: 'dct_manage.dbo.Test', Column: 'Uno' Use the CONVERT function to run
>this query. ---------------------------------------------------------
>
---
MaximumASP offers enhanced hosting solutions on the Windows 2000 platform. Dedicated processor, RAM, and server resources provide
dedicated server performance at virtual server prices. Commercial components provided; custom components allowed.
---
You are currently subscribed to asp_web_howto as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-asp_web_howto-$subst('Recip.MemberIDChar')@p2p.wrox.com
|
|
 |