|
The date-conversion from DatePicker.Value fails, probably the string isn't recognized as a real date.
Untested code incoming;
objcon.getconnection()
Dim query As String
query = @"
insert into kalavithik (
name,
address,
phone_no,
mobile_no,
date,
lenth,
shoulders,
cheast,
waist,
sleeves,
nack,
[...])
values (
@name,
@address,
@phone_no,
@mobile_no,
@date,
@lenth,
@shoulders,
@cheast,
@waist,
@sleeves,
@nack,
[...])
Dim mycmd AS OleDbCommand
mycmd = New OleDbCommand(query, objcon.mycon)
mycmd.Parameters.AddWithValue("@name", txtname.Text)
mycmd.Parameters.AddWithValue("@address", txtAddress.Text)
mycmd.Parameters.AddWithValue("@phone_no", txtPhoneNo.Text)
mycmd.Parameters.AddWithValue("@mobile_no", txtMobileNo.Text)
mycmd.Parameters.AddWithValue("@date", DateTimePicker1.Value)
[...]
mycmd.ExecuteNonQuery()
Enjoy
I are troll
|
|
|
|
|
============================coding=========================================
objcon.getconnection()
Dim query As String
query = "insert into kalavithik(name,address,phone_no,mobile_no,date,lenth,shoulders,cheast,waist,sleeves,nack,slit,flair,shalwar,churidar,back_dard,a_h,remark,lenth1,shoulders1,cheast1,waist1,sleeves1,nack1,remark1) values ('" & txtname.Text & "','" & txtAddress.Text & "','" & txtPhoneNo.Text & "','" & txtMobileNo.Text & "','" & DateTimePicker1.Text & "','" & txtLenght.Text & "','" & txtShoulders.Text & "','" & txtCheast.Text & "','" & txtWaist.Text & "','" & txtSleeves.Text & "','" & txtNack.Text & "','" & txtSlit.Text & "','" & txtFlair.Text & "','" & txtShalwar.Text & "','" & txtChuridar.Text & "','" & txtBackDard.Text & "','" & txtAH.Text & "','" & txtRemark.Text & "','" & txtLength1.Text & "','" & txtShoulders1.Text & "','" & txtCheast1.Text & "','" & txtWaist1.Text & "','" & txtSleeves1.Text & "','" & txtNack1.Text & "','" & txtRemark1.Text & "')"
objcon.mycmd = New OleDbCommand(query, objcon.mycon)
objcon.mycmd.ExecuteNonQuery()
===========================================================================
ERROR: Syntax error in INSERT INTO statement.()
Data base: acces,infield error 'date'& data type 'date/time'
|
|
|
|
|
Is there anyway to have FIPS compliant FTP server and Client without having to use a 3rd Party Application such as Globalscape FTP? Will the settings in Group Policy on Windows XP but sufficient enough? and if so how does make the FTP service FIPS compliant.
Thanks
GSC
|
|
|
|
|
why i have the following msg ??
Namespace or type specified in the Imports 'System.Managment' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. C:\Documents and Settings\XeleX\Local Settings\Application Data\Temporary Projects\WindowsApplication1\Class1.vb
|
|
|
|
|
This normally means that you need to add a reference to the DLL to your project. Choose Add Reference... in Solution Explorer to add the relevant DLL to your app.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys
|
|
|
|
|
does anyone know if xmlnode.Attributes is case sensitive
eg is xmlNode.Attributes["Type"].Value the same as xmlNode.Attributes["TYPE"].Value
Thank you
|
|
|
|
|
Dude, three hours ago you replied to someone in another CP forum by telling them to get an XML primer, and now you ask this question? It seems you should follow your own advice, yes?
|
|
|
|
|
Is it possible to build an assembly that uses PInvoke to use functions from a Win32 DLL and then expose this assembly via COM to a VB 6 application?
I built a .NET assembly and successfully exposed methods via COM to VB 6. However, when I tried to expose a Platform Invoked method, it fails stating that the method doesn't exist.
I'm thinking this whole "public extern static methodName()" business is the root of all evil.
Thanks!
---Dan---
|
|
|
|
|
It should be possible, although from your post it is not possible to understand the value or benefit of doing it.
danvdw03 wrote: I'm thinking this whole "public extern static methodName()" business is the root of all evil.
That's the way I view it. What I mean is that there are other solutions that I would exhaust before settling on PInvoke.
|
|
|
|
|
Dear Developers
I need to provide an environment that users can build a formula usuin field names of a database
table and some string functions like "substr","left", and "right".The environment saves formula
in a string variable,and when user clicks a button,my code must run that formula over values of
those fields for selected record of that table.
Now,I have that environment and it returns formula as a sring to me,but I don't still have any
idea how to run this string.Do I have to write some code to compile it?I found that .Net has
some namespaces for building dynamic methods,I mean Document object model,but if I want to use
classes of this namesapce I have to convert that formula to IL,which is more difficult for me.
Is there any other idea how I can run a user defined expression inside my code and show up its
result to user?That expression can be like this,if we suppose all table field names start with
"fld":
"fldDKCode+fldDKSerial+Substr(fldDKDate,3,2)+fldDKId+Left(fldDKUserName)"
and I have a database table named TBDKUsers,includes all fields mentioned above.When user clicks
on Run button,my program must show the result of this expression for selected record of TBDKUsers.
Thnakk you very much
Reza
|
|
|
|
|
Original here[^].
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys
|
|
|
|
|
Is anyone running VS2008 with IE8RC2? I am having an issue where 'active content' is being blocked in the designer. I can view forms without any problem, but I run into this when viewing the designer for a service installer. I've only been able to find one other mention of this problem but unfortunately the forum post was unanswered. Anyone have any ideas?
-Jim
|
|
|
|
|
I haven't figured out the cause of the problem yet but I was able to get around it. I noticed the .resx for the installer was not found. I happened to have recently removed the existing one to let it re-create it. I restored the resx and it now loads in the designer.
-Jim
|
|
|
|
|
Hi all,
I have two .NET assembly(one library and one WinForm exe) , which i am going to release to the external world. I do not want the public methods of my library to be consumed by anybody other than my exe. Is there an elegant way of doing that?
Regards,
James
|
|
|
|
|
You could always apply a licence to the dll and only allow access to methods if the consumer honoured the licence.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys
|
|
|
|
|
You could make all the classes internal and declare your exe as a friend.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
How protective do you want to be? You could have the assembly require that certain information be supplied by the calling application before it would work. If the code simply uses a "have things been validated" check, it might not be too hard to bypass, but if some magic constants play a key role in the operation of your assembly you could store them encrypted and use some type of cryptographic handshake with your main application. Unless the assembly and application are both adequately secured against reverse-engineering it will be possible for someone with access to both to reverse-engineer what's going on, but it would be considerably trickier than bypassing a simple validation check.
|
|
|
|
|
hi
value returned from the API GetSystemMetrics(SM_NETWORK) is always 3 for me.
Wat does it mean
i have seen fromthe msdn that the SM_NETWORK is used to identify whether the system has network connection or not. Least significant bit is set if the system has network coonection or else it will clear that bit.
but i am gettign value as 3.. What is the reason for it ?
thanks
|
|
|
|
|
The only bit that's documented is the least significant. Other bits in the return value may or may not be set, but there is no documentation on what they mean.
|
|
|
|
|
Hey guys, what's up?
I have this web service I wrote which works perfectly fine when run on Windows Server 2003 with SP1. However, when I run the same thing on Windows Server 2003 with SP2, I get "Method not Allowed" 405 http error.
Anyone knows what might cause this?
Thanks,
Lior
|
|
|
|
|
|
At this point most of us should also receive like a Google MVP award. I mean besides harassing these dim wits it's about the only other thing I do around here any more.
|
|
|
|
|
I am writing a Visual Studio 2008 Tool Window plugin that exposes a custom toolbox. I create controls on Forms using the 'ToolboxItem' class. I would like to append to the ToolboxItem dependencies, such that my assembly will be auto-inserted as a reference after the control creation. Here's an example of what I'm trying to do:
ToolboxItem tbi = new ToolboxItem(typeof(CheckBox));
AssemblyName[] depends = tbi.DependentAssemblies;
List<assemblyname> listDepends = new List<assemblyname>();
listDepends.AddRange(depends);
listDepends.Add(new AssemblyName("MyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e7d025b3483b4afc"));
tbi.DependentAssemblies = listDepends.ToArray();
The control gets created fine, but 'MyAssembly' is not added to the project references. 'MyAssembly' is installed in the GAC - I've double checked that the full path is correct.
Thanks,
Aaron
|
|
|
|
|
AFAIK, this isn't possible. Imagine what would happen if a malicious application injected itself as a dependency into the Form class. Load Form class = load malicious application into memory = bad in one way or another
The best thing you could do would be making a derived class, and add your assembly as a reference
|
|
|
|
|
I found this one the hard way, http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=295677[^]. After writing and testing a bunch of code that relied on reading from persisted DataTables one of our test databases had columns with single spaces. While this post discusses .NET 3.0 I am seeing the behavior in .NET 2.0. I have not tested to see if it is fixed in any later versions.
However, if I read the same file, which is still persisted with a DataTable object (DataTable.WriteXml()), into a DataSet object instead and use the first DataTable in the DataTableCollection the whitespace is [appears to be, for me anyway] preserved properly in the DataTable
DataSet someData = new DataSet();
someData.ReadXml("somepersistedDataTable.xml");
DoSomethingToDataTable(someData.Tables[0]);
void DoSomethingToDataTable(DataTable dt)
{
}
Not sure if this is the correct place, or a repost for that matter, but wanted to share just in case someone else was having similar issues.
|
|
|
|
|