rlarranaga / bafprp

Automatically exported from code.google.com/p/bafprp
0 stars 0 forks source link

mssql insert errot #44

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Running bafprp.exe -rmssql -lmssql -emssql -pedsn:acc**c 
-pedatabase:IAISAGERC -peuser:Sage** -pepassword:**** -pldsn:acc**c 
-pldatabase:IAISAGERC -pluser:Sage** -plpassword:**** -prdsn:acc**c 
-prdatabase:IAISAGERC -pruser:Sage** -prpassword:****
MetaPhoneErrors -pltable:MetaPhoneLogs BAF_2015-02-20_19h10_36_UTC.pri

What is the expected output? What do you see instead?

Expected output should be a populated table with call records. Instead I am 
receiving errors in the error log table. 

error: Failed to insert record: Record 625: Interlata call into database.  
Query: INSERT INTO MetaCallRecords ) VALUES ) Error: Error while running 
SQLExecDirectA: 42000:1:102:[Microsoft][ODBC SQL Server Driver][SQL 
Server]Incorrect syntax near ")".

Looks like the bracket is backwards. The same error is showing up for all 
inserts into the records table. The log and error tables populate just fine.

What version of the product are you using? On what operating system?

Latest version of bafprp 1.3.1, MSSQL server 2008 R2 and Windows 7 Pro 32 bit. 

Thanks!

Original issue reported on code.google.com by c.khour...@gmail.com on 16 Mar 2015 at 5:09

GoogleCodeExporter commented 9 years ago
Looking at the source code, it might be the record table.

here is the sql. it is basically a copy and paste of what is in the wiki. 

create table MeatCallRecords (
id bigint IDENTITY(1,1) not null primary key,
originatingnpa smallint default 0,
originatingnumber bigint default 0,
terminatingnpa int default 0,
terminatingnumber bigint default 0,
largedigits varchar(16), -- Extra long terminating npas go here
elapsedtime bigint,  -- milliseconds
elapsed_dna_minutes bigint,
calltype int not null,
type varchar(255),
overseasindicator int default 0,
icincid int default 0,
date datetime,
time datetime,
size int,
crc bigint,
filename varchar(255),
filepos bigint,
);
CREATE NONCLUSTERED INDEX IX_orignpa ON MeatCallRecords (originatingnpa);
CREATE NONCLUSTERED INDEX IX_orignum ON MeatCallRecords (originatingnumber);
-- This prevents a baf record from being uploaded twice
CREATE UNIQUE NONCLUSTERED INDEX UX_crc_filename ON MeatCallRecords 
(crc,filename);
CREATE NONCLUSTERED INDEX IX_termnpa ON MeatCallRecords (terminatingnpa);
CREATE NONCLUSTERED INDEX IX_termnum ON MeatCallRecords (terminatingnumber);
CREATE NONCLUSTERED INDEX IX_largedigits ON MeatCallRecords (largedigits);
CREATE NONCLUSTERED INDEX IX_calltype ON MeatCallRecords ( calltype );
CREATE NONCLUSTERED INDEX IX_elapsedtime ON MeatCallRecords ( elapsedtime );
CREATE NONCLUSTERED INDEX IX_elapsed_dna_minutes ON MeatCallRecords ( 
elapsed_dna_minutes );
CREATE NONCLUSTERED INDEX IX_date_time ON MeatCallRecords ( date, time );
CREATE NONCLUSTERED INDEX IX_date ON MeatCallRecords ( date );
CREATE NONCLUSTERED INDEX IX_time ON MeatCallRecords (time);
CREATE NONCLUSTERED INDEX IX_overseas ON MeatCallRecords ( overseasindicator );
CREATE NONCLUSTERED INDEX IX_icincid ON MeatCallRecords ( icincid );

Original comment by c.khour...@gmail.com on 16 Mar 2015 at 6:44

GoogleCodeExporter commented 9 years ago
Was able to solve my issue. It is working great. I had an incorrect field in my 
table.

Cheers!

Original comment by c.khour...@gmail.com on 16 Mar 2015 at 7:02

GoogleCodeExporter commented 9 years ago
Glad you got it working, let me know if you have any other issues

Original comment by charless...@gmail.com on 16 Mar 2015 at 7:51