Got it:
Call CreateTablelPessoas(db)
Fratelli
Got it:
Call CreateTablelPessoas(db)
Fratelli
Hi everyone, I have this declaration:
Sub CreateTablePessoas(db As Database)
' Some code here
End Sub
And then this:
Sub CreateMyForm()
Dim db As Database
Dim tdf As TableDef
Set db = CurrentDb()
Set tdf = GetTable("Pessoas", db)
If tdf Is Nothing Then
CreateTablePessoas (db)
End If
End Sub
But when calling CreateTablePessoas(db) I get error 13: incompatible types (I'm translating the error message from portuguese, so I'm not sure that's how it would display in english). I'm not much of a VBA guy, so what's the problem here? Thanks in advance.
Fratelli
It does indeed ! :D Thank you ;)
Fratelli
Hi everyone, I'm having trouble with this query in SQL (homework!). I have two tables: customer and staff. == Customer (the relevant fields) == customer_id first_name last_name == Staff == staff_id first_name last_name The question is: "select the first and last names of all customers and staff". Can anybody help on how to do that? I don't know how to "append" the results of the two queries, and googling I can only find about INSERT ... SELECT, which is not what I'm looking for =\ Best regards to all.
Fratelli
Why do you think it's a code horror? =P
Fratelli
I everyone, I'm currently initiating the development of a web app in GWT and I was thinking if JAAS is the way to go for me. In every article I've read so far JAAS is configured in an XML file, something like this:
<security-role-mapping>
<role-name>USERS</role-name>
<group-name>Users</group-name>
</security-role-mapping>
Which makes me wonder: will I be able to add roles, users, groups, etc, programmatically (without restarting the server)? If the application grows in a great deal of number of users (and roles, etc), will it escalate? Not sure if it matters, but I'm using NetBeans + GlassFish. regards
Fratelli
I'm not sure this post fits this board, but ... =\ I'm writting a page that calls a webservice through javascript and, now, I'm getting an error from ScriptResource.axd. I have even tryed rewritting the code causing the problem, but the error is the same. Error: i is not a function Line: 5 JS Code
function apagar_utlz_m(id)
{
var tabela = document.getElementById(id);
var tbody = tabela.getElementsByTagName('tbody')[0];
var linhas = tbody.getElementsByTagName('tr');
var j, checked, codigo_nome, ano_pass, obj;
for (j=0 ; j<linhas.length ; j++)
{
obj = linhas\[j\];
checked = obj.childNodes\[0\].childNodes\[0\].checked;
codigo\_nome = obj.childNodes\[1\].childNodes\[0\].value;
ano\_pass = obj.childNodes\[2\].childNodes\[0\].value;
if (checked)
{
function Sucesso(r)
{
if (!r) alert('Erro: não foi possível apagar a entrada');
else
{
if (id == 'utilizadores') selectUtilizadores();
else selectM();
}
}
if (id == 'utilizadores') cnc.servidor.deleteUtilizador(codigo\_nome, ano\_pass, Sucesso, ErroChamada);
else cnc.servidor.deleteM(codigo\_nome, ano\_pass, Sucesso, ErroChamada);
}
}
}
The WebService methods "deleteUtilizador" and "deleteM" are both called (changes are made to the DB!), but "Sucesso" never runs, so I'm assuming the problem is related to this call. Can anybody help? Best regards
Fratelli
I also need to know how to populate the DataGrid for the first time =( regards
Fratelli
I'm not sure this is the right post to ask this, but... I'm writting a web service (C#) and already have a coded "server.asmx" with several methods. Some include inserting, deleting and updating MS-SQL tables. Now I have a grid view (webform.aspx) and I want to link it to those methods. I have already configured the data source to access server, the problem comes when assigning the methods to any of SELECT, UPDATE, INSERT, or DELETE. The question is: after selecting the method, VS prompts for a source for the arguments. Some of the arguments are contants (I'll need these for SELECT), the others I'd like to get from the form's table. Anybody knows how to do this? Best regards
Fratelli
Yes, I already know what the problem is. For further reference: I had something like this
[WebMethod(EnableSession = true)]
public int method_1()
{
...
}
[WebMethod]
public int method_2()
{
// Code that calls metod_1
}
The thing is: If I call method_2, apperently, "Session" will still be null in method_1. I already have a previous post asking how to access "Session" variables in a non-WebMethod method. Regards
Fratelli
Why am I getting this exception here?
if (Session["privilegios"] == null)
Isn't this the way its supposed to check for null? Best regards
Fratelli
Abhijit Jana wrote:
You mean those methods which are not exposed as Web Method ?
Exactly
Fratelli
I'm currently writting a web service with sessions. I have a few methods like (getPrivileges) that need to read from Session[], but that I would not like to have them visible to outside requests. The question is: how do I read a Session[] value (like Session["id"], or whatever) on a method that is not a WebMethod? Best regards
Fratelli
Yes, I noticed already. Lame mistake :sigh:
Fratelli
I have the following table (ccpoc)
poc_cod varchar(10)
poc_cod_asc varchar(10)
poc_desc varchar(40)
With the following data
poc_cod poc_cod_asc poc_desc
1 12 Coiso
1 13 Coisa
1 14 Coisinhas
And I'm trying the following query UPDATE ccpoc SET poc_cod='133', poc_cod_asc='13', poc_desc='Coiso 133' WHERE poc_cod='13' AND poc_desc='Coiso 13' AND poc_cod_asc='1'
I'm querying the server with an ExecuteNonQuery in C#, and everything seems to go fine. No errors, no exceptions, everything runs well. The problem is that data in the table does not change! Anybody has any idea what might be happening? Best regards
Fratelli
Hi there guys! I wrote a BigNum class with two operations (addition and subtraction) and it consists of an array of integers. But lets suppose I read two numbers, with the following digit separation: 120 43 353 54 345 54 345 455 34 344 This is in base ten. Adding them together I get: 174 388 808 88 689 Which, obviously, is wrong. I used the standard addition algorithm, and it seems correct, so my question is: after "manipulating" the values, how can I print them correctly in base 10? Or do I need to keep a byte string with the digits and start from there? Best regards
Fratelli
Hi guys =) need a little help here... Shouldn't this work?
class MyClass
{
public:
void method() {}
void (MyClass::*_callback)();
};
int main()
{
MyClass b;
b._callback = &MyClass::method;
(b.*_callback)(); // error C2065: '_callback' : undeclared identifier
return 0;
}
Fratelli
I know that for templates, but with plain inline functions too? =/ Never happened to me before... Is this a VS thing? regards
Fratelli
The code is kind of large for me to post it here =/ The errors refer many files and functions... Is there a way for me to post the entire source here? regards
Fratelli