Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert a new record

Status
Not open for further replies.

AGMV

Programmer
Sep 25, 2002
1
0
0
MX
How I can insert a new record in a MAS90 file from a VB Application?.
I am using the Providex ODBC.

It is possible to use a SQL Sentece like "INSERT INTO"?
 
THats the theory I am working under. The ODBC driver installed with the MAS90 client is a read only one. Providex makes a version 3.22 ( that is supposed to allow writes when you install it with the custom settings. However, while I no longer get an error, my data still does not seem to end up in the table. So I am still chugging away at that.
 
I have use Insert Into with 3.22 and the record was there when I queried in VB and displayed in a grid. Blew up MAS90 though as I didn't populate all the necessary fields, but the 'insert into' did work.

The 3.22 I downloaded appeared to be only demo without purchase. I am using 3.00 with came with MAS90 3.21.

I have problem Selecting Table/Columns with '/' in the field name.

Cheers
 
Well I had the same problem, but I have nother program I wrote to give me the file layouts from the SOTAMAS90 DSN. While it does contain the slashes, my data browser does not. SO I tried dropping the slash and it worked fine.

Now I am trying to instert a record with a date in it. I keep getting an error no matter what format I try.

This is the statement:
Code:
Insert into IMG_TransDataEntryHeader (TransactionDate, TransactionType, RefNumber, Comment, ToWhseCode, LinkToFirstDetailRecord, DefaultFromWhseCode) VALUES ( '10/31/2002' , '1' , '00000023', 'Brian Test' , '' , 4 , '396')
I have tried the date with and without single qutoes & double quotes, using dashes instead of slashes, backslashes, curly brackets, anything I can think of. I have tried it in yyyymmdd format

ANy ideas?
 
Insert Into BM1_BillMaterialsHeader(LastUsed) Values {d '2002-10-18'} )

Were you able to d/l ODBC 3.4 without demo restrictions?
 
I downloaded 3.22. During the install it askes for a serial number, I just followed the information in the instal instructions on how to derive the serial number and it works.

THanks for the sample code. It worked great.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top