Access 2000 VBA - SQL stored procedure question 
Author Message
 Access 2000 VBA - SQL stored procedure question

Hi,

From an Access form using VBA I'm calling a SQL stored procedure, and inserting a row of data into a SQL 7 Database.  I have variables of 2 types: nvarchar and money.  The money ones insert fine, but the nvarchar ones only insert the first character.  I tried sending the parameters with the parameter object and as a string, both with this same problem.

Any ideas why this might be?

Thanks,
Ray

*** Sent via Developersdex http://www.*-*-*.com/ ***
Don't just participate in USENET...get rewarded for it!



Sat, 13 Mar 2004 20:52:07 GMT  
 Access 2000 VBA - SQL stored procedure question
Actually we just found the answer to this; it was a problem in the SQL stored procedure, not the VBA code.  We weren't specifying a length for the parameters in the SP and they were defaulting to 1....

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Sat, 13 Mar 2004 21:36:03 GMT  
 Access 2000 VBA - SQL stored procedure question
I'd guess it's because nvarchar is a Unicode field and the code is
{*filter*} on the first 0x00 char it sees. This really isn't the best
place to post this, this is an Outlook programming group and you might
have better luck posting in an Access or SQL server group.

--
Ken Slovak
[MVP - Outlook]
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning Visual Basic 6 Application Development, Wrox
Press


Hi,

From an Access form using VBA I'm calling a SQL stored procedure, and
inserting a row of data into a SQL 7 Database.  I have variables of 2
types: nvarchar and money.  The money ones insert fine, but the
nvarchar ones only insert the first character.  I tried sending the
parameters with the parameter object and as a string, both with this
same problem.

Any ideas why this might be?

Thanks,
Ray

*** Sent via Developersdex http://www.*-*-*.com/ ***
Don't just participate in USENET...get rewarded for it!



Sat, 13 Mar 2004 21:37:49 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. access 2000 vba and stored procedures

2. Calling a SQL Server 2000 store procedure from MS-Access

3. doing updating from grid to sql server with stored procedure sql 2000

4. Executing MS SQL Server 2000 stored procs via MS Access 2000

5. VB.NET,SQL SERVER 2000 STORED PROCEDURE PARAMETERS, CRYSTAL REPORTS

6. Crystal Reports/SQL 2000 - Reporting from a Stored Procedure with multiple selects (for a sub-report)

7. Crystal Reports 8.5, SQL Server 2000, and Stored Procedures

8. Type Name is Invalid error -- Windows 2000/98 application with SQL Server/stored procedure problem

9. SQL Server 2000 stored procedure not returning rows

10. Logging SQL Server 2000 Stored Procedure Output

11. HELP!!!!, using ADO + SQL 2000 + Stored procedures does not return a value

12. Crystal Reports/SQL 2000 - Reporting from a Stored Procedure with multiple selects (for a sub-report)

 

 
Powered by phpBB® Forum Software