...variable does solve the problem. Thanks.
So to sum up.
The following code:
int main() {
int Phase = 3;
double kva = 1000, x;
x = 1000 * Phase/3.0;
if( kva > x )
printf("greater than");
else
printf("less than or equal");
return 1;
}
returns the...
hi.
thanks for reading the post victorv.
The compiler does know about fractions and type conversions in expressions.
For example,
int / int results in an int. e.g. 1/3 = 0
double / int results in a double e.g. 1.0/3 = 0.333...
int / double also results in double e.g. 1/3.0 = 0.333...
but to...
...( or so it seems ).
Here is a short piece of code:
#include <stdio.h>
int main() {
int Phase = 3;
double kva = 1000;
if( kva > (1000 * (Phase / 3.0)) )
printf("greater than");
else
printf("less than");
return 1;
}
I am compiling this program under...
hey try usleep(x) where x is in microseconds.
for example usleep(500000) will sleep for 0.5 seconds...
i don't know if this will work.
it's just an idea.
Hello,
I am trying to switch from a database running on the JET engine to one that uses MSDE. However, I am having some difficulties getting the sample database NORTHWINDCS to work.
I have two computers both with WIN XP PRO installed. Let's say my computer is named A and the remote computer is...
...if it could be reduced
Private Sub Form_Load()
On Error GoTo form_load_err
Dim rs As Recordset
Set rs = CurrentDb.OpenRecordset("select * from [core surplus]")
prefix0 = rs("drawing # prefix")
rs.MoveNext
prefix1 = rs("drawing # prefix")
rs.MoveNext
prefix2 =...
Thanks John
I also thought that # character was interpreted as some type of delimiter.
But it's funny that this code works.
Set rs = CurrentDb.OpenRecordset("SELECT [DRAWING # PREFIX] FROM CORE WHERE [DRAWING NUMBER]=" & Me!prefix2 )
Notice that I have switched the location of...
I have the following
Set rs = CurrentDb.OpenRecordset("SELECT [DRAWING NUMBER] FROM CORE WHERE [DRAWING # PREFIX]=" & "" & Me!prefix2 & "")
It gives the error:
---
Run-time error '3075'
Syntax error (missing operator) in query expression '[DRAWING #...
The funny thing is that when I write the equivalent code in DAO I don't experience this problem of delayed table updates.
Here is the code
Private Sub Command55_Click()
On Error GoTo command55_click_err
Dim dbs As Database, rst As DAO.Recordset
Dim quote As String
Dim number As Integer
Dim...
Ok, the following code checks to see if a record exists in the ORDER table, and if it doesn't it adds it to the table. It uses an ADO implementation. Now, the problem is, it takes a while before the ORDER table is updated with the new entry. I was thinking that the table would be updated...
...so I am not sure what is wrong.
Code looks like this now.
Private Sub Form_Load()
Dim cnn As ADODB.Connection
Dim rst As ADODB.Recordset
Set cnn = CurrentProject.Connection
Set rst = New ADODB.Recordset
'syntax error here
[COLOR=#ff0000]
rst.Open = "SELECT WSPECS.*...
ok great.
Here is how you do it.
Create a textbox, name it Text2.
Right click on the Text2 textbox. Select PROPERTIES
Click on the FORMAT tab.
Set the VISIBLE property of NO. (3 rows down)
Create the "No" Checkbox, let's call it Check0
Right click on the "No" checkbox and...
I'm no expert. But if you above code doesn't work you could try this:
Private Sub Form_Open(Cancel As Integer)
Me.AllowEdits = False
Me.AllowDeletions = False
Me.AllowAdditions = True
Me.DataEntry = True
End Sub
Hope this helps!
....ConnectionString = "data source= " & CurDB.Name
.Open
End With
Set rst = New ADODB.Recordset
rst.CursorType = adOpenDynamic
rst.LockType = adLockOptimistic
'something is wrong here
rst.Open "SELECT WSPECS.*, WSPECS.
I have the following code that works perfectly when compiled in 16-bit. When it is compiled in 32-bit, there is no response when a particular menu option is selected. The code looks something like this:
//this part doesn't seem get executed, probably because the
//program is confused by WPARAM...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.