Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Hugo
Starting Member
3 Posts |
Posted - 2002-12-03 : 10:19:11
|
First of all, this is my FIRST posting here. I hope you guys can help me out.I have the following code: (I know is part of an ASP code, but the problem IS on the SQL part.)My windows version is Windos XP, and I use the Microsoft Access.**************************** the codedim myset_altera_colunamyset_altera_coluna = "ALTER TABLE tb_estoque ADD novacoluna single"set myset_altera = server.createobject ("adodb.recordset")myset_altera.ActiveConnection = MM_conexao_STRINGmyset_altera.Source = myset_altera_colunamyset_altera.CursorType = 0myset_altera.CursorLocation = 2myset_altera.LockType = 3myset_altera.Open()**********************************It was working 100%, my new colum was created and I used it for a bunch of things. Some weeks later I formated my HD, and needed to configure my IIS again, but now this code simple gives me an error. The following text is what I recive.************************************************************Informações técnicas (para a equipe de suporte)Tipo de erro:Microsoft OLE DB Provider for ODBC Drivers (0x8007000E)[Microsoft][Driver ODBC para Microsoft Access] Número excessivo de campos definido./dir/innerdir/part_2_4_testes.asp, line 19 (myset_altera.Open())Tipo de navegador: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Página: GET /dir/innerdir/part_2_4_testes.aspHora: sexta-feira, 29 de novembro de 2002, 12:42:38 ************************************************************OK, it's in portuguese, I'll try to translate:************************************************************Technical information (for the support team)Type of error:Microsoft OLE DB Provider for ODBC Drivers (0x8007000E)[Microsoft][Driver ODBC para Microsoft Access] Excessive number of fields defineds./dir/innerdir/part_2_4_testes.asp, line 19 (myset_altera.Open())Navigator type: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Page: GET /dir/innerdir/part_2_4_testes.aspTime: friday, 29th november 2002, 12:42:38 pm************************************************************Well, the conection string is correct, my aplication can read and write without any problem. Everything is just like before the formatation, execpt this code.So I ask you guys - Ask no, I BEG you guys, what could be wrong?I've read some stuff about the problem, and everything indicates that my problem was memory, but that is impossible, I'm using the same amount of memory as I did before. And there's more, the table I'm trying to alter "tb_estoque" has only 12 lines and 6 columns.I think my problem is on the IIS configuration, but I can't see where.Please help me!Thanks a lot for your time, and I apologize for any grotesque "English Writting error" that I could have performed.Hugo Setta from Rio de Janeiro, Brasil.- Trying to survive - |
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-12-03 : 15:08:15
|
Well, for one thing, you're trying to execute an ALTER TABLE statement using an ADO Recordset object. A recordset is supposed to return rows, but an ALTER TABLE will never return rows. You can execute the statement directly through the connection object like so:MM_conexao_STRING.Execute "ALTER TABLE tb_estoque ADD novacoluna single"Something tells me that that's not right, but essentially you want to use the Execute method of the Connection OBJECT (NOT the connection string). You can also use a Command object that uses the same connection string.You can find more examples on ADO Command objects on the following web sites:www.4guysfromrolla.comwww.asp101.comwww.15seconds.comwww.learnasp.comwww.aspalliance.com |
 |
|
Hugo
Starting Member
3 Posts |
Posted - 2002-12-04 : 06:48:55
|
WOW! Thanks man, I'm kind of newbe in SQL and stuff.But after some hours of useless tries, we (me and my boss) figure it out. It was a problem with the DB. It was... I don't know, trashed and messy, we used that tool from MS Access - Clean up and compact DB - and the problem was fixed.Anyway thanks for the tips about returning columns and stuff.See ya.- Trying to survive - |
 |
|
|
|
|
|
|