|
Thank you so much ,,,
the idea is clear now ...
I will start programing with "TCP with sockets".
The book looks greate
kind regards,
I know nothing , I know nothing ...
|
|
|
|
|
I am writing an app that requires centralizing a number of Access App's data files into one SQL server. Albeit separate databases within it.
I know the Access Upsizing wizard can migrate access tables to SQL. As can the SQL server import wizard. However, I need to be able to schedule this and request it at any time from the server.
Getting the Access mdb files onto the server isn't a problem, that's all handled with WebServices. However, I can't for the life of me find a way to automate the table creation and data insertion for the sql server.
I have come across a number of resources listing how to pull data from a datatable object and create the database on the server using SMO (SQL Managemant Objects, i think) But I can't see any resources on how to actually pull the Access data into a Datatable object in the first place. Either way, this method obviously will incur some speed penalties, also maybe some problems with datatypes etc... So finding a way to automate the sql import is by far the better idea!
If anyone has any ideas I would be so grateful!
Thanks a lot.
Ben
|
|
|
|
|
Hello guy´s
I´ve a problem with the implementation of Sudoku in c#....
i wrote 2 for-loops, one that tests the collums, one that tests the rows if the numbers 1-9 are unique in a row/col... The 2 Loops are working perfect, but only if i use ONE of them.. The 2 loops are not working together , I think it´s a Overflow...
I try to interlace the for-loops, but i´m with stupid.. I have to ask for help in this forum
here is a bit of code
using System;
using System.Collections.Generic;
using System.Text;
namespace sudoku
{
class sudoku
{
private int[] values_right = new int[81];
private int[] squareindex = new int[81] {0, 0, 0, 1, 1, 1, 2, 2, 2,
0, 0, 0, 1, 1, 1, 2, 2, 2,
0, 0, 0, 1, 1, 1, 2, 2, 2,
3, 3, 3, 4, 4, 4, 5, 5, 5,
3, 3, 3, 4, 4, 4, 5, 5, 5,
3, 3, 3, 4, 4, 4, 5, 5, 5,
6, 6, 6, 7, 7, 7, 8, 8, 8,
6, 6, 6, 7, 7, 7, 8, 8, 8,
6, 6, 6, 7, 7, 7, 8, 8, 8};
private int[] posible_values = new int[9] { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
public sudoku()
{
this.generate();
}
public void generate()
{
Random rnd = new Random();
int i;
for (i = 0; i < 81; i++)
{
while (this.values_right[i] == 0)
this.values_right[i] = rnd.Next(1, 90) % 10;
while (check_position(i) == 0)
{
this.values_right[i] = (this.values_right[i] + 1) % 10;
}
}
}
public int[] get_values_right()
{
return values_right;
}
int check_position(int i)
{
if (this.values_right[i] == 0)
return 0;
Random rnd = new Random();
int row = i - (i % 9);
int col = i % 9;
int position;
for (position = row; position < row + 9; position++)
{
if (position == i)
continue;
if (this.values_right[position] == this.values_right[i])
return 0;
}
return 1;
}
}
}
Thanks for help, members of coding...
I´m sure, its only a LITTLE 1-MINUTE problem 4 you..
Thank again..^^
modified on Thursday, August 27, 2009 2:25 AM
|
|
|
|
|
|
You might get lucky and find someone fool enough to visit an unknown site and download goodness knows what, but most won't.
If you have a section of code that doesn't work then post it here, with a full explanation of the problem, any error messages or odd results. Remember to format your code properly by using the 'code block' widget above the text entry box, or surrounding it with <pre></pre> tags.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
ok thanks
I now pastet code into the post
|
|
|
|
|
I have some forms tht load data in grid in background. As its huge data, until it gets loaded I want progress bar form to show the load status... how can I do that?
|
|
|
|
|
try backgroundworker , you can found it in you VS toolbox->Component.
When you start loading data
Call backgroundworker to start
Show your loading Form
When the background worker Finish ...
Close the Loading Form ....
I know nothing , I know nothing ...
|
|
|
|
|
If you look at the example implementation code in my ProgressWorker article that I linked to earlier, you will see that it does exactly what you want. In the DoWork event handler, do your grid loading. If you can provide values along the way to indicate the progress, set the ReportsProgress property to true and call the ReportProgress method when you want to update the progress, otherwise set it to false and you'll get a Marquee style.
If you don't want to use my component, then it's easy to set up a BackgroundWorker and a ProgressBar to do exactly the same thing. I just combined them into one to make life easy!
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
I have created a custom configuration section in my config file. I can read from it with out any problem. How ever, When I try to write a new value to the element I get an error: "System.Configuration.ConfigurationErrorsException: The configuration is read only".
This is a desktop application so I wouldn't think it was because of insufient permissions. Any suggestions on how to solve this would be very much appreciated.
// This is what is in the config file
<configuration>
<configsections>
<appsettings>
<add key="QueryStartDate" value="05-07-2009">
<add key="QueryEndDate" value="11-07-2010">
<connectionstrings>
<add name="DB_RS2100" connectionstring="Driver={MySQL ODBC 3.51 Driver};Server=127.0.0.1;DATABASE=DB_RS2100;OPTION=3">
<custom
stringvalue="Veh8900"
="">
// This is the class I am using to access the custom config section.
namespace CSDBControl
{
class CustConfig: ConfigurationSection
{
private static ConfigurationProperty s_propString;
static CustConfig()
{
// Predefine properties here
s_propString = new ConfigurationProperty(
"stringValue",
typeof(string),
null,
ConfigurationPropertyOptions.IsRequired
);
}
// Gets/sets the StringValue setting.
[ConfigurationProperty("stringValue", IsRequired = true)]
public string StringValue
{
get { return (string)base[s_propString]; }
// **** This is where the read only error occurs
set { base[s_propString] = value; }
// Also tried:
// set { this[s_propString] = value; }
// set { this["stringValue"] = value; }
}
}
}
// I am accessing my configuration file like this:
string SelVehicles = "Vehicle1;
CustConfig custConfig = (CustConfig)ConfigurationManager.GetSection("custom");
// This works, I can read the value just fine
string test = custConfig.StringValue;
// This does not work. Not able to write to he config file.
custConfig.StringValue = SelVehicles;
Craig
|
|
|
|
|
Hi All,
I have a need to drop a control onto another control at a precise location. The location can change based on how many controls are currently on the target control. It's sort of like snap-to-grid without the grid.
Thanks,
Jim
|
|
|
|
|
Why dont you use an asp table and on load you build your table and where the control is needed you just load it?
|
|
|
|
|
It is a Winforms project, and the target must be incremented based on the number of objects present.
|
|
|
|
|
Well I wish i could help you but i work with web app not win , best luck there
|
|
|
|
|
Check your email Jim.
Kevin
It got bounced back. Send me an email and I'll reply with the file.
Everything makes sense in someone's mind
|
|
|
|
|
I am looking for a way to change the mouse scheme in windows and keep in changed even after my program exits
|
|
|
|
|
you mean Mouse Cursor ?
if so, try to change it from windows registry
Here Please[^]
I know nothing , I know nothing ...
|
|
|
|
|
Hi ,
I have an application which takes time to load data into a grid so inorder to see the status of data loading I want a small window to pop up showing how much is loaded in the form of progress bar . the application is in C#.... Can someone help me with information on how to do this. I know how to get it at bottom of page dragging progress tool bar.. but i want a small window wid % amount loaded in center !!!
Actually I have multiple forms so I want a generic progress bar form showing loading progress while in the background data is getting loaded. the form in the front shows how much % of data is loaded . sorry for mistyping
if you can temme how I can make this working while the form in the background is getting loaded with some data . I want this form to show the stuff it is showing in front while data gets loaded in back .. !!
|
|
|
|
|
|
|
hi, I am doing similar thing.. but I have some forms tht loads in grid in background. As its huge data, until it gets loaded I want this progress bar form show the status... how can I do that and call this? Please Help me out
|
|
|
|
|
You should not hijack other peoples threads. Post a question of your own. In any event there are two article linked to in this thread, if they do not help you, then your problem is not at all similar to the OPs.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hello!
I have created a pretty cool application that works in the office environment, it allows for people to pass text, files and voice chat between each other. Its much like the Yahoo chat or those types of apps but allows you to select several people and simultaneously send encoded data. You can see the app here:
http://www.umbrasystems.com/gcomm.php
The way it works is; there is a server who sits listening on a port, the chat clients connect to that server. As chat clients connect, the server gives a list of the other connected chat clients, and informs the existing chat clients of the newcomer, so all clients now have each others names and IP addresses. When the user(chat client) wants to send a message to one or more users, he selects them from the interface and sends the data. The data is sent P2P because each chat client has its own listening server which the sender connects to to send the data, be it text or file or whatever.
This application system works great in a LAN environment but if there is a chat client outside, lets say the boss is at home but still wants to talk to the employees, he/she can't make a P2P connection to any of the others inside the LAN. This is assuming the boss can at least connect to the server(which may sit on the outside). The way I have it now is if the P2P can not be established then all data is routed through the host.
My question is this:
Assuming all chat clients have a connection to the server, how do I make a P2P connection to other chat clients on other LANs? How do other applications like Skype or Yahoo make that connection??? (and without having to port forward). I'm sure that Skype and Yahoo messenger connect to a common server initially as well.
In my server I can see that there are 2 connections, bill and Tom, who's addresses are the same 66.75.225.55:3045 and 66.75.225.55:4033, but the server has communication with them on different ports established by their LAN's router's NAT table. Is it feasible for the chat client 'Pat', who is on a different LAN, to use the address and port established by the host to directly send data?
I would appreciate any insight on how this is done!!
|
|
|
|
|
I have the same question.And there are no good answers to this question by Intenet searching.I hope who have solved this give the answer.
|
|
|
|
|
I have not really found a solution to the question but if you do a search on Rendezvous servers you can get an idea on how some of the professional applications solve this problem. Currently if the applications can't make a point-to-point connection then I just route all data through the host.
|
|
|
|
|